Skip to content
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

Add a form attribute to the button component #4588

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

pezholio
Copy link
Contributor

This allows us to have a button outside a containing form element (see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#form) This is useful if we want to have two buttons in a form group next to one another inside a form group (for example if one form action submits the form and the other button submits to a form to delete the item that is being edited)

@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4588 January 23, 2025 16:44 Inactive
Copy link
Contributor

@andysellick andysellick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some very tiny suggestions, but happy to approve and let you deal with them. Also please remember a changelog entry 👍

This allows us to have a button outside a containing form element (see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#form)
This is useful if we want to have two buttons in a form group next to
one another inside a form group (for example if one form action submits
the form and the other button submits to a form to delete the item that
is being edited)
@pezholio pezholio force-pushed the add-form-attribute-to-button-component branch from 7dafe33 to d3f7eb6 Compare January 29, 2025 14:00
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4588 January 29, 2025 14:01 Inactive
@pezholio pezholio merged commit 9fd883d into main Jan 29, 2025
11 of 12 checks passed
@pezholio pezholio deleted the add-form-attribute-to-button-component branch January 29, 2025 14:04
pezholio added a commit that referenced this pull request Jan 30, 2025
* Update to LUX 4.0.29 ([PR #4597](#4597))
* Add a `form` attribute to the button component ([PR #4588](#4588))
pezholio added a commit that referenced this pull request Jan 30, 2025
* Update to LUX 4.0.29 ([PR #4597](#4597))
* Add a `form` attribute to the button component ([PR #4588](#4588))
@pezholio pezholio mentioned this pull request Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants