FF1+ IE5+ Opr7+

Submit Once! Form validation

Author: Dynamic Drive

Description: If you have forms on your site, you know they are extremely prone to abuse by users. Apart from incomplete or bogus entries, the most common offense is duplicate submissions by the same individual, caused by pressing the "Submit" button over and over and over again. Well, this DHTML script has a cure for the problem, by allowing you to disable the submit (and reset) button once it is pressed once.

Demo: (Fill out the below FAKE form, and press submit):


Directions: Developer's View

Step 1: Insert the below validation code into the <head> of your page:

Select All

Step 2: Inside the form in question, add the part in red to the <FORM> tag, as follows:

<form method="POST" onSubmit="submitonce(this)">

Two simple steps for you, one giant step for form validation!

Wordpress Users: Step by Step instructions to add ANY Dynamic Drive script to an entire Wordpress theme or individual Post