Skip to content

feat(ui5-button): introduce support for form attribute#13321

Merged
didip1000 merged 6 commits intomainfrom
button-form-support
Apr 3, 2026
Merged

feat(ui5-button): introduce support for form attribute#13321
didip1000 merged 6 commits intomainfrom
button-form-support

Conversation

@didip1000
Copy link
Copy Markdown
Contributor

@didip1000 didip1000 commented Mar 24, 2026

This PR introduces the form property to ui5-button, enabling buttons to submit forms even when placed outside the form element. This brings the component in line with native HTML button behavior.

Usage:

The form property in the ui5-button takes in an ID of a form as a string allowing the button to submit the associated form:

<form id="externalForm">
    <!-- form fields -->
</form>

<ui5-button form="externalForm" type="Submit">Submit</ui5-button>

Fixes: #7459

@ui5-webcomponents-bot
Copy link
Copy Markdown
Collaborator

ui5-webcomponents-bot commented Mar 24, 2026

🧹 Preview deployment cleaned up: https://pr-13321--ui5-webcomponents.netlify.app

@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview March 24, 2026 08:29 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview March 24, 2026 08:41 Inactive
Comment thread packages/main/src/Button.ts Outdated
@didip1000 didip1000 marked this pull request as ready for review March 26, 2026 11:49
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview March 26, 2026 11:56 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview April 2, 2026 11:34 Inactive
@didip1000 didip1000 merged commit c9d8f2a into main Apr 3, 2026
27 of 30 checks passed
@didip1000 didip1000 deleted the button-form-support branch April 3, 2026 07:02
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview April 3, 2026 07:02 Inactive
@ui5-webcomponents-bot
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version v2.21.0 🎉

The release is available on v2.21.0

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow "form" attribute to be used on buttons

4 participants