Cut & Paste Double-enter form field script
|
Description: You've probably encountered forms where you're asked to double-enter a field, such as the email or password field. This provides confirmation on the accuracy of the input. Well, use this script to add such a functionality to your forms. It cross checks any two fields to ensure they are:
1) Not blank
2) More importantly, that the two inputs are identical.
If either of the above conditions are not met, an alert message prompts up, and the submission process is halted.
Example:
Directions: Simply add the below to the BODY section of your page:
As illustrated inside the source code, add the code:
<form onSubmit="return verify(this.emailone, this.emailtwo)">
inside your form tag to associate the two fields named "emailone" and "emailtwo" so the later is a double-check of the former.