## Setting up your form

Once you have designed the form controls on your form you need to specify the action to be taken when the user submits the form.

### To define the form action

- Open the Page menu and choose Form Setup....

The Form Setup dialog box allows you to specify what happens when the user submits the form, add hidden fields to the form to pass additional information to the server, and add additional code to the form.

- Set the method to POST (the usual option), or GET (a less frequently used option that puts the form parameters and values as part of the URL).
- In the Action field specify the URL of the script designed to process the form.
- In the Encoding field you can optionally specify the form encoding.
- Click the OK button to set up the form.

### To specify hidden fields

You can send additional information to the form script in hidden fields, which behave just like form controls but are not visible on the form. Each hidden field has a name, which is the parameter sent to the form script, and the value, which is sent as the parameter’s value.

For example, you might have a questionnaire consisting of several questions each with the answers Yes, No, or Don’t know on separate pages of your Web site. You could process each question using the same form script, and pass the number of the question in a hidden field.

### To define a hidden field

- Click the Hidden Fields tab in the Form Setup dialog box.

- Click the New... button to define a new hidden field:

- Enter a name for the field and its value, and click the OK button to save the field.

Note that you should normally choose a unique name for each form control or hidden field on your form, so that the value of each item is sent to the form script as a separate parameter. If you do give several form controls the same name, the parameter will be set to a list of their values.

Contents