Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

HOW TO: Use Hidden Fields in a Form with FrontPage 2002


View products that this article applies to.

This article was previously published under Q292622

↑ Back to the top


Summary

This article describes how to use hidden fields in your forms.

The Save Results Form Handler and the Registration Form Handler are both examples of form handlers. When a form is submitted in the browser, the values of each form field are passed to the form handler (specified by the action attribute of the <form> tag). For example, if your form field is a text box, the value sent to the form handler is the text entered in the text box.

The values of each of the form fields between the <form> and </form> tags are sent to the form handler. Not all form fields are visible, however. Some form fields are hidden. Even so, you can assign values to these hidden form fields and pass the values to the form handler.

This can be especially useful when you have multiple forms that save results to a common e-mail address or results file. You can use a hidden field on each form that identifies the form by a unique number or name. The hidden fields in the form results then indicate from which form the results came.

Adding Hidden Form Fields

To create hidden fields in your forms, follow these steps:
1.Open the page that contains your form.
2.Right-click a form field, and then click Form Properties on the menu that appears.
3.In the Form Properties dialog box, click Advanced.
4.Click Add.
a. In the Name box, type the name of the new hidden field.
b. In the Value box, type the value that is to be sent to the form handler.
5.Click OK three times.
6.On the File menu, click Save.

Use Hidden Form Fields with the Registration Form Handler

You must take a few extra steps in order to save hidden fields by using the Registration Form Handler:
1.Right-click the form, and then click Form Properties on the menu that appears.
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 (saves all fields including hidden fields), or click OK.
6.Click OK in the Form Properties dialog box.

↑ Back to the top


References

For additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base:
260535 FP2000: Hidden Form Field Values Can't Be Changed
194156 FP98: How to Create a Registration Web
193955 FP98: Overview of FrontPage Components
177092 FP97: Overview of FrontPage Discussion Web Architecture
197735 FP2000: No Access to Form Properties by Right-Clicking Form Field
183049 FP98: Save Results Form Handler and Four-Digit Year Format
197605 FP2000: [FrontPage Save Results Component] Appears Instead of Form

↑ Back to the top


Keywords: KB292622, kbhowtomaster, kbhowto

↑ Back to the top

Article Info
Article ID : 292622
Revision : 2
Created on : 6/29/2004
Published on : 6/29/2004
Exists online : False
Views : 321