-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow form group classes on radios and checkboxes #1043
Allow form group classes on radios and checkboxes #1043
Conversation
845be65
to
f91a830
Compare
I think if we want to add this potentially we want to make sure you can set formGroupClasses anywhere that formGroups are used? Or are these the only places? Just thinking people will expect this to be consistent across components. |
@NickColley most likely, see #1042 |
Are there other things that we can foresee users wanting to add form-groups in the future, like attributes? Just wondering if we should opt for I also wonder whether this is one area where providing a boolean flag (e.g. |
would error :true additional option be more confusing? what if you want both classes and the error state? |
f91a830
to
2080e92
Compare
2080e92
to
5bbfbed
Compare
…error message Currently the error state for conditionally revealed content shows the 'error bar' against the revealed content only. We want to move the error bar to the 'question' which will include the revealing radios themselves.
… an error message Currently the error state for a conditionally revealed content shows the 'error bar' against the revealed content only. We want to move the error bar to the 'question' which will include the revealing checkboxes themselves.
420b51d
to
6d6a3af
Compare
rewritten to accept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
What
Make it possible to toggle the
govuk-form-group--error
class on the form group for radios and checkboxes without having to pass an error message.Why
Currently the error state for a conditionally revealed checkbox shows the 'error bar' against the revealed content only.
We want to move the error bar to the 'question' which will include the revealing checkboxes or radios themselves.
To do this we have in introduced a `formGroupClasses' option in the Nunjucks macro that allows a CSS class to be set directly on the form group.
Example of an error state set on the whole group
Trello ticket: https://trello.com/c/LggtR8s5/1455-make-it-possible-to-set-the-error-state-on-checkboxes-and-radios-without-passing-an-error-message