A form builder for Ruby on Rails that’s compatible with the GOV.UK Design System.
MIT License
Bot releases are hidden (Show)
Published by peteryates over 3 years ago
#govuk_submit
, the submit element and all the additional content is wrapped in a div.govuk-button-group
element, which automatically arranges and spaces the buttons/links within. The old behaviour of adding some margin to the right of the submit element has been dropped completely #237Published by peteryates over 3 years ago
Published by peteryates almost 4 years ago
govuk-frontend
to 3.10.2 #228#govuk_collection_radio_buttons
#227Published by peteryates almost 4 years ago
wildcards
option on #govuk_date_field
#220Published by peteryates almost 4 years ago
Published by peteryates almost 4 years ago
hint: nil
was not suppressing hints when matching localisations exist. Thanks to @cpjmcquillan for reporting this. #212, #213Published by peteryates almost 4 years ago
Published by peteryates almost 4 years ago
#govuk_error_summary
by allowing errors on the object's :base
to link to the field specified in the link_base_errors_to:
argument. The automatically-generated href
would contains the word base
(eg person-base-field-error
) so won't link to any of the fields. If the argument isn't provided the the old behavoiur remains as-is. Thanks to @friedsock for reporting this. #209Published by peteryates about 4 years ago
tag: nil
and the legend text won't be wrapped by any other tag. Many thanks to @fofr for diagnosing the problem in #201, #204To continue wrapping legends in a h1
and maintain the old behaviour throughout, just set the default back to h1
:
GOVUKDesignSystemFormBuilder.configure do |conf|
conf.default_legend_tag = 'h1'
end
Published by peteryates about 4 years ago
form_group_classes
argument with form_group
and allow it to take either a Hash
or Proc
#173hint_text
with hint
and allow it to take either a Hash
or Proc
#174nil
) #185hint
, label
, caption
and legend
hashes as HTML attributes on the relevant element #190govuk_check_boxes_fieldset
behaviour with regard to hidden fields:
multiple
flag #196See #175 for more details, but the main things to look out for are:
hint_text: 'blah'
with hint: { text: 'blah' }
form_group_classes: %w(polka-dots)
with form_group: { classes: %w(polka-dots) }
#govuk_check_boxes_fieldset
are able to be submitted with a present but empty param instead of none. There is now a valueless #hidden_field
added to the form to represent an unchecked state (see #192, #196)legend: nil
. This probably doesn't affect anyone because legendless fieldsets aren't a good idea, but just in casePlease get in touch with @peteryates or raise an issue if there are any breakages while upgrading
Published by peteryates about 4 years ago
#govuk_checkbox
's unchecked_value
default back to false
for the moment, it causes too much of a change in the output HTML for a minor release. The option to override it remains in place but the default behaviour is now the same as in v1.2.7
. #193Published by peteryates about 4 years ago
unchecked_value
to false
instead of 0
makes Rails omit the hidden field altogether - I'd love to know why! Now the unchecked_value
defaults to 0
but can be overridden if necessary. Thanks again to @zheileman for helping confirm the behaviour #192Published by peteryates about 4 years ago
Published by peteryates about 4 years ago
3.8.0
#167:html
to improve guide markup #165Published by peteryates over 4 years ago
classes
arguments to be passed either a String
or Array
#160Published by peteryates over 4 years ago
govuk_select
and add documentation for undocumented args (options and html_options
), thanks to @david-mears-dfe for reporting this #154rubocop
, rouge
and sassc
#156, #155, #157Published by peteryates over 4 years ago
Published by peteryates over 4 years ago
Published by peteryates over 4 years ago
Published by peteryates over 4 years ago
govuk-
) to be changed throughout via a configuration option #127link_errors
when using #govuk_check_boxes_fieldset
and #govuk_radio_buttons_fieldset
#1312.7.1
, 2.6.6
, 2.5.8
) and Rails (6.0.3
, 5.2.4
) #141