Microsoft KB Archive/825546

= How to use hidden fields in a form in Expression Web, in SharePoint Designer 2007, and in FrontPage 2003 =

Article ID: 825546

Article Last Modified on 6/27/2007

-

APPLIES TO


 * Microsoft Office SharePoint Designer 2007
 * Microsoft Expression Web
 * Microsoft Office FrontPage 2003

-





SUMMARY
This step-by-step article describes how to use hidden fields in Microsoft Expression Web, in Microsoft Office SharePoint Designer 2007, or in Microsoft Office FrontPage 2003 forms.

When a user uses a Web browser to view a form, and then types information in the fields on the form, when the user submits the form, the browser passes the values that the user has typed in each of the form fields to the form handler. The tag's action attribute specifies the value that the browser passes to the form handler.

For example, if your form field is a text box, the browser sends the values of each of the form fields between the and the tags to the form handler. The Save Results Form Handler and the Registration Form Handler are examples of form handlers.
 * Registration Form Handler

With the Registration Form Handler, you can automatically register users for access to a service. The Registration component adds the user to the authentication databases of the service. The Registration component can then gather information from the form and store the information in one of several formats, such as HTML or ASCII. You can access the Registration component from the Form Properties dialog box.
 * Save Results Form Handler

The Save Results Form Handler gathers information from a form and stores the information in one of several formats, such as HTML or ASCII. When you submit the form, the Save Results Form Handler appends the form information to a specified file in a specified format. You can access the Save Results Form Handler from the Form Properties dialog box.

Some form fields may be hidden when you view the form. You can assign values to the hidden form fields and pass the values to the form handler. For example, if you have many forms that save results to a common e-mail address or results file, you can use a hidden field on each form to identify each form by a unique number or name. The hidden field in the form results tells you from what form the results came.

Adding hidden form fields
To create hidden fields in your forms in Expression Web, in SharePoint Designer 2007, and in FrontPage 2003, follow these steps:
 * 1) Open the page that contains your form.
 * 2) Right-click the form, and then click Form Properties.
 * 3) In the Form Properties dialog box, click Advanced, and then click Add.
 * 4) In the Name box, type the name of the new hidden field.
 * 5) In the Value box, type the value that you want to be sent to the form handler.
 * 6) Click OK, click OK, and then click OK again.
 * 7) Click File, and then click Save.

Use hidden form fields with the Registration Form Handler
To use the Registration Form Handler to save hidden fields, follow these steps:
 * 1) Right-click the form, and then click Form Properties.
 * 2) In the Form Properties dialog box, click Options.
 * 3) Click the Saved Fields tab.
 * 4) In the Form Fields to Save box, type the hidden fields that you want to use.
 * 5) Click Save All to save all the fields, including the hidden fields, click OK, and then click OK.

