Skip to content

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

Open
didip1000 wants to merge 5 commits intomainfrom
button-form-support
Open

feat(ui5-button): introduce support for form attribute#13321
didip1000 wants to merge 5 commits intomainfrom
button-form-support

Conversation

@didip1000
Copy link
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
Collaborator

ui5-webcomponents-bot commented Mar 24, 2026

@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
@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
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.

Allow "form" attribute to be used on buttons

3 participants