What the Form Validation on Steroids Program Does
This script performs form validation on any Web form that has been configured to use it. It is much fancier than validation scripts which feature pop up alerts, and can be used by anyone who knows HTML.

See Example If you're looking for a less robust form validation script, check this out.

The program informs the user that they have left required form fields empty by re-writing the fields and their directions to the page using a feature of Dynamic HTML. If this kind of error is made, the form data is not submitted, and will not be submitted until the user fills out the required field(s) no matter how many times the submit button is clicked.

So What?
Yes, you have seen this before. Or at least you think you have.

What makes this program special is that it is written in JavaScript. Since JavaScript is client-side, several problems caused by doing the exact same thing with a server side language are solved:
  1. Validation executes immediately - the user is not forced to wait for the data to be submitted, validated, then sent back.
  2. Excess Data Traffic is eliminated. This is important to a site owner if they pay for traffic.
  3. Server CPU cycles are saved. The server's load is reduced because execution happens client side.
  4. Did I mention the user does not have to wait for validation?
Features
Scripter Friendly
The program was written to be scripter friendly. Any other kind of validation can be added if you know JavaScript. A pre-made version containing some extra validation is also available with the Add-Ons Version. Just about any other extra bells and whistles can be added without affecting the innate functionality of the program. If you come up with a nifty add-on you'd like to share, let me know and I'll be happy to post it.

Flexibility
Multiple fields can be grouped together, such as 3 text fields used to gather the 3 parts of a phone number. Although three different text fields are used to gather what is essentially interpreted as one value, the program knows to re-write them together if one or more are left empty, and will also submit the data together. It also remembers the value of the one or more fields that were filled in when it re-writes the group so that the user does not have to enter the same info more than once.

Groups can contain different field types, e.g. your form can have a set of radio buttons grouped together with a select menu and a textarea if that's what you want.

Compatibility
The program is backward and forward compatible.
-Browsers that do not support Dynamic HTML functionality can still run the program, but the validation they will execute is in the form of alerts telling the user which fields were left empty.
-The HTML output is 100% XHTML 1.0 compliant, regardless of how you write the original form. The XHTML output does not affect older browsers because they use alerts for missing required fields rather than re-writing the fields.

Prettier Forms
Both form buttons and images are supported for the "Submit" and "Reset" form controls.

Trouble Shooting
If you are experiencing problems getting the program to function properly;
-read through the configuration directions carefully to make sure you have configured your form properly
-uncomment the alert statement to view the output (basic version: line 402, add-ons version: line 483)
-check to make sure the copyrights are intact

Browser Support
Currently the script has been tested on Internet Explorer 5.5 and 6.0, Netscape Navigator 4.51, 4.7 and 6.2, and AOL 7.0 all on Windows OS, to error-free results. This doesn't mean those browsers are the only ones that support the script, it only means that it has not been tested on other browsers/platforms. If you discover any browsers with specific problems, please let me know so that I can make adjustments. If you try the script and like it, let me know which browsers/platforms you've used it on.

A version with less stringent requirements, that is supported by a very broad range of browsers is available for a small license fee. Contact me if you are interested in this version.


Home | Tutorials