Creating Forms
After opening the Form Wizard using the
button, you can start to set up the form. The controls in the bottom left of the wizard allows you to set what script the form should run, and how. If the form sends information to the script, select the Post option button. If it gets information from the server, select Get. You also have to type in the file name of the server-side script the form runs, if any, into the Form Action text box.
After you have set up the form, you need to add controls to it. To add a control, select the type of control you want from the buttons down the left hand side of the wizard. This will display the page into which you can type in the information needed to create that control. Each control needs to be given a name, or ID. See the About Forms topic for more information about naming controls. Most of the other information needed for each control is reasonably self-explanatory, but below is a list of some of the more obscure options which you can set for some controls.
- Action (onclick event) Applies to Button, Submit and Reset.
If you want one of these controls to perform a different action to normal, you should type in the code for the operation you want it to perform into this text box. This normally means using the Java language.
- Language of onclick event Applies to Button, Submit and Reset.
If you have specified some code for and onclick event for one of these controls, you need to tell the browser what language it is written in. This can be either JavaScript or VBScript.
- Item Text/Item Value Applies to List Box and Combo Box
For each item in these controls, when the information in them is sent to a script the information sent is the value of the selected item. Each item has both a text value (the text the user sees) and a value (the text sent to a script). You can set both of these properties seperately for each item in the list. To add more items, press [Tab] in the last cell in the table. Each row in the table represents one item in the list.
Once you have set up the options for a control, click on Add Control. This will check the name of the control against those already in the form. If it finds that another control already exists with this name, it will prompt you to change it. Otherwise, the control will be added to the form. Two exceptions to this rule are the checkbox and radio button. All the checkboxes and radio buttons for one field, e.g. How good is this (Very Good, OK, Poor), must have the same name. The text sent to the script for the group will be the combination of the checked buttons or boxes with this name.