About collecting data using forms

Microsoft Office FrontPage 2003

After you decide what form fields to put on your form, the next step is to set rules for the ways you want your site visitors to enter data in the fields. These data entry rules, also called validation, make sure that a site visitor fills out the form correctly. For example, you can set up an order form for your products, but unless the customer's name, address, and payment information are correctly entered, he or she won't be able to complete the order.

ShowSetting rules for how site visitors enter data in forms

  • Types of rules you can set for your form fields:

    ShowText box validation

    You can specify the type of data, as well as other criteria, to allow for text boxes and text areas. For example, to collect a member number or a serial number, set up a text box to accept only numbers and disallow the use all other characters as appropriate. You can also require a fixed number of characters so that a site visitor does not omit a number or letter by mistake.

    ShowOption button validation

    You can require a selection to be made from a group of option buttons. For example, if your form has two option buttons, Yes and No, and a site visitor tries to submit the form without making a selection, a message is displayed.

    ShowDrop-down box validation

    You can require a site visitor to make a choice from a drop-down box, set the minimum and maximum number of choices to allow, and disallow the first choice from being selected. For example, you can disallow the first item from being selected if it is an instruction, such as "Select an item."

ShowHandling information you collect from the form

After setting up the data entry rules, you need to decide how you want the form results to be handled. After a site visitor submits the form, you must collect the data that he or she entered— the form results— so you can view them, display them to the visitor, or work with them as needed.

When a site visitor submits a form in the browser, the values of each of the form fields between the <form> and </form> tags are sent to a form handler. For example, if the form field is a text box, the value sent to the form handler is the text entered in the text box. Microsoft FrontPage provides several form handlers, which take the form results and perform various actions.

ShowSave the results to a database

Each time a site visitor submits a form, FrontPage saves the information to a database. For example, if you use a form to collect contact information, you can save the results directly to your customer database. You can save results to an existing database or FrontPage can create one for you.

ShowSave the results to a text, HTML, or XML file

Each time a site visitor submits a form, FrontPage attaches the results to a file. You can then open the file and view the results. For example, you can set up a guest book for your Web site and choose to save the results to an HTML file. You can create a link to the file so that site visitors can see what others have written. In the case of saving form results to an XML file, you can use the results in FrontPage, or export the results into any application that understands XML, such as Microsoft Office Excel 2003.

ShowSend the results in e-mail

Each time a site visitor submits a form, FrontPage sends you an e-mail message containing the results of that form.

You can also choose to use your custom scripts to handle the form results.

Notes

  • If you use any of the form handlers rather than a custom script, the FrontPage Server Extensions from Microsoft or Microsoft Windows SharePoint Services must be installed on the server where your Web site is located.
  • To save form results to XML, your form must be located on a server running Windows SharePoint Services.

Security  

  • Cross-site scripting is a security vulnerability that could affect many Web sites and site visitors. The vulnerability is the result of coding mistakes in Web applications. For more information about cross-site scripting and how to protect your Web site and site visitors, see information about the cross-site scripting security vulnerability on the Microsoft TechNet Web site.
  • Use this feature with caution. Sensitive or confidential information could be revealed to other users.