Publisher review:Restricting Form Submission uses javascript cookies to restrict the number of times a user can submit a form. Restricting Form Submission uses javascript cookies to restrict the number of times a user can submit a form.
The JavaScript below shows you the validate( ) function as well as the various cookie-related functions.. Three things to note:
- Use the maxSubmits variable to set the maximum number of times the user is allowed to submit the form.
- The name of the cookie is TotalSubmissions. If you plan on using this code in multiple forms, be sure to use a unique cookie name in each form.
- I've included a button that enables you to reset the cookie to 0. This is for testing purposes only! You should delete this as soon as you're finished testing the form.
Restricting Form Submission is a JavaScript script for Forms and Controls scripts design by Paul McFedries.
It runs on following operating system: Windows.
Operating system:Windows