-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 "form" attribute to buttons of type="submit" #1456
Comments
@undavide Allowing the |
I'm guessing this is related to wanting the enter key to trigger the submit button's action? I'm having a hard time imagining wanting to submit a form in a dialog via the browser which would trigger a full page reload. If so, it seems related to #855 |
Uhm, actually no, my feat request was specifically only about being able to use a submit button when the button itself can't be inside the |
i think there are some other libraries out there regarding |
Since the I have a similar use case where I was trying to put a form inside the content area of a dialog, and then include a submit button in the footer of the dialog, because wrapping the input and submit buttons in the same |
I think |
I'm struggling with the same Issue. My very ugly workaround right now is to add
|
I've also run into this issue. I have a situation where I'm trying to deal with a nested form. The natural conclusion is instead to have self-closing forms with ids that the inputs then refer to. This doesn't seem possible to do with react-spectrum. |
As outlined in #6481, I think this is a very important issue, as this would be universally applicable & areas of application are manifold. The Beware though that we'd need a solution which takes into account not only |
🙋 Feature Request
It would be nice to have a "form" attribute for React Spectrum Buttons, when they are of type="submit".
🔦 Context
See the following example coming from the React Spectrum examples page:
The dialog is nicely designed, and the content is kept separate in the
<Heading>
,<Content>
, and<Footer>
.Problem is that the ButtonGroup, which very likely contains a submit button in such Dialogs, belongs to the Footer, i.e. it's not contained within the
<Form>
component – hence it can't act as a Button of type="submit".In HTML it's possible to add a
form
attribute to a submit Button, so that it can work regardless to its positioning. E.g.A similar possibility for
<Form>
and React Buttons would be nice to have.Thanks!
The text was updated successfully, but these errors were encountered: