core
core copied to clipboard
Disable submit button after submitting form
Describe the bug
When a user clicks on submit button to submit a form that button does not disable so If the form takes time to submit meanwhile user thinks the button is not clicked so he clicks again so the form is resubmitted. In slow form submission, the admin receives more than 1 form even 10 forms due to multiple clicks on submit button.
To Reproduce
Steps to reproduce the behavior: Open a form Fill that form Click on submit button Submit button is not disabled while submission
Expected behavior
Submit button should be disabled while submission but after an error, this should enable again, In case of success submission page redirects to thank you page so the team can decide whether submit button would enabled after success or not.
Acceptance Criteria
- Users should not be able to submit the form more than once
Customer Ticket: https://dotcms.zendesk.com/agent/tickets/108371
Hey team! Please add your planning poker estimate with Zenhub @hmoreras @jcastro-dotcms @jdotcms @rjvelazco
PR: https://github.com/dotCMS/core/pull/22972
Approved QA - Tested on 22.10_e9a89d0a_SNAPSHOT // Docker // macOS 12.6 FF v105