Prevent simultaneous submission of multiple forms
See original GitHub issueBug, Feature, or Question?
Feature/Question
Current Behavior
When there are two HTML form
s present a submission will attempt to submit both forms. This causes validation to run on both even if it was desired to only submit one.
Desired Behavior
Only the target of the even should be submitted.
Suggested Solutions
This can be implemented in userland but it would be awesome if passing an id
or name
to the form
element would prevent multiple form submission from happening. Formik could look at event.target.name
or event.target.id
and only call this.executeSubmit
if if matches the element. EDIT: It can also be implemented using refs so that the user doesn’t have to provide an id
or name
.
- Formik Version: v0.11.10
- React Version: v16.2.0
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
How to prevent form from submitting multiple times from client ...
Use unobtrusive javascript to disable the submit event on the form after it has already been submitted. Here is an example using jQuery....
Read more >Prevent simultaneous submission of multiple forms #135
How can I prevent simultaneous submission of two forms? In my particular case I have login + reset password forms (in a modal...
Read more >How can I prevent multiple form submissions? - Jotform
How can I prevent multiple form submissions? · Use cookies (loose check) or IP address (strict check) to prevent multiple form submissions. ·...
Read more >How to disable multiple form submit (POST) in IIS - Server Fault
You would have to find a way to block more than 'x' connections from one IP address. Where x is greater than the...
Read more >Stopping Multiple Form Submission. - Laracasts
The most straight forward way to guarantee the uniqueness of a form submission (In the sense of stopping someone mashing submit twice) is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@prichodko,
Yes, that was clear!
Yup. Thanks for all your help fellas.
@migueloller sorry if I wasn’t clear enough - it was what I meant by
prevent the event from bubbling up
.Let’s close it then?