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.
Creating Hidden Fields in Forms
- Open the page that contains your form.
- Right-click a form field, and then click Form Properties on the menu that
appears.
- In the Form Properties dialog box, click Advanced.
- Click Add.
- In the Name box, type the name of the new hidden field.
- In the Value box, type the value that is to be sent to the form handler.
- Click OK three times.
- On the File menu, click Save.
How to 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:
- Right-click the form, and then click Form Properties on the menu that
appears.
- In the Form Properties dialog box, click Options.
- Click the Saved Fields tab.
- In the Form Fields to Save box, type the hidden fields that you want to use.
- Click Save All (saves all fields including hidden fields), or click OK.
- Click OK in the Form Properties dialog box.