Feature #2817
Provide safeguard for preventing multiple submits of a form
Status: | Needs Feedback | Start date: | 2009-03-10 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | MVC | |||
Target version: | - | |||
PHP Version: | Complexity: | |||
Has patch: | No |
Description
We need a mechanism which prevents the user from accidentally submitting a form multiple times. This should be handled both on the client and on the server side.
On the client side a simple JavaScript will check if the form has been submitted and if so displays a message if the user tries to submit it a second time.
On the server side some hash which is unique to that rendered form should be checked to figure out if that particular form instance is already being processed.
Related issues
History
#1 Updated by Robert Lemke about 6 years ago
- Target version set to 283
#2 Updated by Robert Lemke about 6 years ago
- Target version deleted (
283)
#3 Updated by Bastian Waidelich almost 2 years ago
- Status changed from New to Needs Feedback
- Has patch set to No
IMO this is not the responsibility of the framework as we can't know for sure whether a request is idempotent or not. Besides this would violate the "stateless" principle of HTTP.
Usually a simple solution is to disable the form on submit via JavaScript.