Validating contact form

Lisa Wollin Microsoft Corporation May 2004 Applies to: Microsoft® Office Front Page® 2003 Microsoft Front Page 2002 Microsoft Front Page 2000 Summary: Learn how validate HTML form fields using Java Script in Microsoft Office Front Page 2003.

This article assumes a general understanding of HTML and Java Script.

validating contact form-39validating contact form-64

(16 printed pages) Introduction Getting Started Writing the Validation Script Connecting the Form to the Script Associating Form Fields with Custom Script Code Listing Conclusion When you create forms, providing form validation is useful to ensure that your customers enter valid and complete data.

For example, you may want to ensure that someone inserts a valid e-mail address into a text box, or perhaps you want to ensure that someone fills in certain fields.

using the built-in HTML5 validations has the advantage that the browser itself shows the error message.

You can customize those validations to fit your needs Every form requires a server side script to collect the form data and do the processing like send emails, save to database etc.

In addition, this article assumes a general understanding of HTML and Java Script, although a thorough understanding is not required.

For more information about HTML and Web scripting, see one or more of the following references.

The script uses a library called Form Handler, which inturn, uses other libraries.

Here is the code of the Server side form validations are essential for any form.

You can't trust data sent to a form processing script.

For this form, the server side form validations are done using this PHPForm Validation library.

This form comes with a PHP script to handle the form submissions.

Tags: , ,