Skip to content

feat: Support associating components with external forms #8411

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

devongovett
Copy link
Member

Closes #4117, closes #1456, closes #7892

Adds the form prop to all components that render an <input>, <select>, or <button>. This allows associating these components with an external form, i.e. when the component is not within a <form> in the DOM hierarchy.

For buttons there are a few more form-related props as well. We previously added these only to RAC (#4452), but this adds them to RSP and hooks as well.

@rspbot
Copy link

rspbot commented Jun 18, 2025

Build successful! 🎉

@devongovett
Copy link
Member Author

lol the ts diff is too big 😂

Copy link
Member

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

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

approving, we can use force merge so we don't need to change anything with the comment-pr job right now

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.

Add "form" attribute to all components that render an <input>, <textarea> or <select> Add "form" attribute to buttons of type="submit"
3 participants