About creating forms in FrontPage 2003

 Important   Forms depend on technology that your Web server must provide. That technology may be FrontPage Server Extensions (FrontPage Server Extensions: A set of programs and scripts that support authoring in FrontPage and extend the functionality of a Web server.), SharePoint Team Services version 1.0 from Microsoft, or Microsoft Windows SharePoint Services 2.0. However, it could also be ISAPI (ISAPI: Internet Server Application Programming Interface. A Web server application-development interface, developed by Process Software and Microsoft, that can be used in place of CGI.), NSAPI (NSAPI: Netscape Server Application Programming Interface. A Web server application development interface developed by Netscape Communications Corporation.), CGI (CGI: Common Gateway Interface. A standard method of extending Web server functionality by executing programs or scripts on a Web server in response to Web browser requests, such as in form processing. Use of CGI can make a Web page more dynamic.), or Active Server Pages (ASP). Before you create a form, ask your Web server adminstrator or Internet service provider (ISP) (ISP: A business that provides access to the Internet for such things as electronic mail, chat rooms, or use of the World Wide Web. Some ISPs are multinational, offering access in many locations, while others are limited to a specific region.) which technology the server supports.

What is a form?

A form on a Web site is similar in concept to a form on paper, except that you create it online and use it to interact with, and gather information from Web site visitors.

Typically, site visitors enter information (also known as 'values') into form fields and indicate their preferences by clicking option buttons, check boxes, and drop-down boxes. Site visitors can also type comments into text boxes or text areas.

For instance, you can use forms on your Web site to:

  • Retrieve contact information from site visitors (for example, guest books)
  • Receive feedback about your Web site
  • Accept orders and gather shipping and billing information
  • Conduct surveys
  • Provide online registration
  • Offer search box mechanisms
  • Prompt users to log in to your Web site

You specify how the submitted data (the form results) are collected and stored and decide whether and how to display the results back to the visitor as a confirmation page of their entries.

For more information about FrontPage 2003 forms, select one or more of the following:

ShowBest practices for creating a form

Determine what technology is running on the Web server hosting your Web site    Forms depend on technology that your Web server must provide. That technology may be FrontPage Server Extensions (FrontPage Server Extensions: A set of programs and scripts that support authoring in FrontPage and extend the functionality of a Web server.), SharePoint Team Services version 1.0 from Microsoft, or Microsoft Windows SharePoint Services 2.0. However, it could also be ISAPI (ISAPI: Internet Server Application Programming Interface. A Web server application-development interface, developed by Process Software and Microsoft, that can be used in place of CGI.), NSAPI (NSAPI: Netscape Server Application Programming Interface. A Web server application development interface developed by Netscape Communications Corporation.), CGI (CGI: Common Gateway Interface. A standard method of extending Web server functionality by executing programs or scripts on a Web server in response to Web browser requests, such as in form processing. Use of CGI can make a Web page more dynamic.), or Active Server Pages (ASP). Ask your Web server adminstrator or Internet service provider (ISP) (ISP: A business that provides access to the Internet for such things as electronic mail, chat rooms, or use of the World Wide Web. Some ISPs are multinational, offering access in many locations, while others are limited to a specific region.) which technology the server supports.

Determine which form fields will best suit your information-gathering needs    For example, do you want visitors to type an answer or select from a list of prepared options? If you want to collect feedback, how much space do you want to provide?

Set up the functionality for each field    After deciding which form fields to use, you can refine how the form field will function. For example, you can specify the length of a text box, decide whether an option is selected by default, and you can define the choices in a drop-down box.

Set data entry rules    Also called "validation," data entry rules ensure that site visitors fill out the form correctly. For example, you can set up an order form for your products, but unless the name, address, and payment information are entered correctly, your customers won't be able to complete and submit the order.

You can also specify a format for the information you want to collect. For example, to collect a club member number, you can set up a text box that only accepts numbers and hyphens, and disallows other characters. You can also require a fixed number of characters so that site visitors do not omit a number by mistake.

Add a confirmation page     Unless you are using a custom script, FrontPage automatically displays a confirmation page to your site visitors. You can also create your own confirmation page and determine which fields to display back to them.

If you do not create and assign a confirmation page of your own, FrontPage will use the default confirmation page, which displays a list of all the form field names and the values a site visitor has entered into those fields.

Create keyboard shortcuts     A keyboard shortcut enables site visitors to select a field in a form by using the keyboard rather than by clicking the field. The shortcut appears as an underlined letter in the form field label. Site visitors select the form field by pressing ALT plus the underlined letter to navigate to that field.

Specify the tab order for the form    Site visitors can navigate through a form — moving from field to field — by pressing the TAB key. By default, the order of fields on the page (from top to bottom) is the order in which visitors can tab through the form. You can, however, specify a different tab order.

ShowMethods to initiate the creation of a form

There are four methods to initiate the creation of a FrontPage 2003 form:

  1. Add a blank form and build on to it by adding form fields.
  2. Insert the first form field directly on your Web page and a form area is automatically added to contain that field. Of course, if FrontPage does not automatically create a form area, the default setting has been changed, and you can reset it.
  3. Select and use an available form template.
  4. Use the Form page wizard.

 Note   The Form page wizard and the form templates are available from the New task pane, under New page, click More page templates, and then click the General tab.

ShowSetting data entry rules (validation)

When you use forms to collect data from Web site visitors, you'll want to make sure the information you retrieve is valid, and you'll need to decide how and where to store the data.

Data entry rules validate that the form fields contain only correctly entered data. For example, you can set up an order form to collect a customer's name. Your data entry rule can specify that the customer enter only letters and disallow the use of all other characters. This validation ensures that unless the customer enters the data as you've requested, he or she won't be able to complete the order.

Data entry rules you can set for specific form fields:

ShowText box and text area validation

You can specify the type of data and number of characters to allow in text boxes and text areas. To collect a visitor's phone number, for example, set up a text box to accept only numbers and disallow the use of all other characters. 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 site visitors to select at least one option from a group of options. For example, if your form has two option buttons, Yes and No, and a site visitor attempts to submit the form without making a selection, a message displays informing the visitor to complete the selection.

ShowDrop-down box validation

You can require site visitors to make a choice from a drop-down box, set the minimum and maximum number of choices they can make, and prevent the first choice from being selected. For example, if you've used the first option to instruct visitors about what to do, such as "Select an item," you can prevent that first option from being selected.

ShowHandling data you collect from a form

After site visitors submit the form, you must collect the data that they have entered — the form results — so you can work with it as needed.

When site visitors submit a form in the browser, the values of each form field between the <form> and </form> tags are sent to a form handler (form handler: A program on a server that is executed when a site visitor submits a form. A form in FrontPage is associated with a form handler.) or other customer script. For example, if the form field is a text box, the value sent to the form handler or custom script is the text entered in the text box.

FrontPage supports several form handlers that reside on servers running FrontPage Server Extensions (FrontPage Server Extensions: A set of programs and scripts that support authoring in FrontPage and extend the functionality of a Web server.), SharePoint Team Services version 1.0 from Microsoft, or Microsoft Windows SharePoint Services 2.0. These form handlers take the form results and perform various actions. FrontPage also supports custom scripts such as ISAPI, NSAPI, CGI, and ASP. You can specify what these actions are by selecting one of the following:

ShowSave the results to a database

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

You can also use the Form page Wizard and Database Interface Wizard with ASP or ASP.NET to edit, view, or search records from a Web page. The Form page Wizard works on a Web site running Windows SharePoint Services 2.0, yet the Database Interface Wizard does not.

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, view the results yourself, or you can show the results to your site visitors. For example, you can set up a guest book for your Web site so that site visitors can see what others have written. Choose to save the guest book data results to an HTML file, and then create a link to that file.

If you are saving form results to an XML file, you can use FrontPage directly, or you can export the results into any program that understands XML, such as Microsoft Office Excel 2003.

ShowSend the results in e-mail

Each time site visitors submit a form, FrontPage sends you or whomever you specify, an e-mail message containing the results of that form. The FrontPage Server Extensions transfer e-mail so that you can use feedback forms securely and invite others to view your site.

ShowUse custom scripts

 Notes 

  • If you use custom scripts, your hosting server does not require the FrontPage Server Extensions, SharePoint Team Services from Microsoft 1.0, or Microsoft Windows SharePoint Services 2.0 from Microsoft.
  • If you use form handlers rather than custom scripts, your hosting server must have: FrontPage Server Extensions, SharePoint Team Services from Microsoft 1.0, or Microsoft Windows SharePoint Services 2.0. Contact your server administrator or ISP to learn if the server hosts these extensions.
  • To save form results to XML, your form must be located on a server running Microsoft Windows SharePoint Services 2.0.
  • 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 security vulnerability and how to protect your Web site and site visitors, visit the Microsoft Technet Web site.
  • Collect and distribute private data with caution. Sensitive or confidential information could be unintentionally revealed to other site visitors.

For more information about creating custom scripts to handle form results, see Validating form controls using JavaScript.

Add a form Web Part

If your Web site is hosted on a server running Microsoft Windows SharePoint Services 2.0, you can add a Form Web Part to your Web page. If your site is not hosted on a server running Windows SharePoint Services 2.0, you can only insert a standard form.

For more information about form Web Parts, see the following articles:

ShowAbout search forms

 Important   FrontPage search forms are not supported by Web sites hosted on servers running Windows SharePoint Services 2.0. However, Windows SharePoint Services 2.0 includes a different type of search mechanism that you can use.

You can create a search form to enable site visitors to search your Web site for specific words or phrases. When site visitors enter text in the search text box and click the search button, they get a list of Web pages with content that matches the search criteria. The server hosting the Web site carries out the search and returns the names and locations of the Web pages that contain that text.

The easiest way to create a search form is to create a new page based on the FrontPage Search Page template (template: A set of predesigned formats for text and graphics on which new Web pages and sites can be based. After a page or site is created using a template, you can customize it.). You can customize the template with your own introductory text, copyright information, button labels, and so on.

 Note   The Search Page template and the other form templates are available from the New task pane, under New page, click More page templates, and then click the General tab.

How search forms work

If your Web site is hosted on a Web server running the FrontPage Server Extensions (FrontPage Server Extensions: A set of programs and scripts that support authoring in FrontPage and extend the functionality of a Web server.) from Microsoft or Microsoft SharePoint Team Services 1.0 , FrontPage automatically creates a text index based on the words contained in all of the pages in your Web site. When a site visitor submits a search form, FrontPage checks the text index and displays a weighted list of hyperlinks to the pages containing the search text.

How the text index works

When you save a page in a Web site, FrontPage adds any new words to the text index for that Web site. The text index is cumulative: new words are added to the index, but old ones are not removed. You can also create a new text index and purge outdated words.

 Note   A search form will not locate the most common English words, such as "a," and "the."

Search the text index

If your Web site is published to a Web server running Microsoft Internet Information Services (IIS) (IIS: Internet Information Services. Microsoft Web server software that uses Hypertext Transfer Protocol to deliver World Wide Web documents. IIS incorporates various functions for security, allows for CGI programs, and also provides for FTP servers.), the search form uses Indexing Service to search the text index. Indexing Service has more extensive support for searching non-English systems and Microsoft Office documents.

If your server is not running IIS, FrontPage uses the WAIS (Wide Area Information Server) (Wide Area Information Server (WAIS): A UNIX-based document search and retrieval system on the Internet that can be used to search over 400 WAIS libraries for indexed files that match a series of keywords.) search engine that is included with FrontPage to search the text index.

 Note   Your Web server administrator or ISP can tell you if the server is running IIS.

ShowAbout hidden form fields

When you hide the fields on a form, you are intentionally concealing certain data from site visitors. That data may or may not be confidential — but mostly you hide it to avoid confusion, and to provide only the information site visitors need.

Here are some ideas about how you can use hidden fields to hide form field data from your site visitors:

  • Use a hidden field on each form that identifies the form by a unique name or number. The hidden fields in the form results then indicate from which form the results came.
  • Store information from one Web page to another in a multi-page form. This can save your site visitors the time and hassle of re-entering identical data on each page.
  • Collect additional data from your site visitors such as a login name or a timestamp.
  • Track responses by using internal IDs, such as a customer name, order number, or employee number.
  • Combine information with your survey responses so that you can sort and cross-tabulate the results.
  • Specify a form field value to be the e-mail address of the person who will receive the data entered by site visitors.
  • Redirect site visitors to a confirmation page that contains hidden form field data. The fact that the data is hidden means it does not appear on the Web page that site visitors view and they cannot change the it.
  • Use hidden fields to contain fielding codes that differentiate audiences from one another, such as those in different locations or departments. Fielding codes help you localize your survey results. You can also use fielding codes to separate testers from your real audience.

 Important   While users cannot see or change the data in hidden form fields directly, it is not secure. Users can view the source code of a Web page in a Web browser, and discover the values of the hidden fields.

 
 
Applies to:
FrontPage 2003