Intelligent Contact Form
Tutorial courtesy of the folks at HB Graphics, Guilford CT

Pre-validation before a form is transmitted can reduce the agrivation of the user, and if done correctly, can even make mistakes a plesant experience.
      In this example a JavaScript is used to not only validate the entry but also to list all the empty fields in order. Additionally, when the alert box is dismissed, the cursor is placed at the first required field.
      The coding may seem intense, but take your time with it.

Please enter contact information
Your Name:      Items in bold
Company:      are required
Address 1:      input fields.
Address 2:
City:  State:  Zip:
Phone:   xxx-xxx-xxxx
E-mail:
Please select your areas of interest
Accounting Financial Statements Corporate Accounting/Taxes
Estate Planning/Taxes Financial Planning
Individual Accounting Taxes Income Tax Examination/Appeals
Tax Research Other
Please enter comments or services not listed above

         


To view the source code click here.
To get a working copy of the code, use "Save As" or
"View Source" from the Source Code window.