of values entered into form objects. For instance, in our helpdesk.htm page, we expose two Text Field form object and one Textarea form object. Because these form objects are responsible for collecting the employee's name, their station ID, and a description of the problem, we'll want to make sure that the user enters values into these fields before submitting the form. Furthermore, we'll want to make sure that the user enters only numbers in the station ID text field as opposed to letters, words, or a combination of numbers and letters. Using the Validate Form behavior is as simple as selecting the form to which you want to attach the behavior, selecting the behavior, and configure the fields to be validated in the dialog. To do this yourself, follow these steps: 1. Open the helpdesk.htm page. 2. Select the form. You can tell the form has been selected when all the objects within the form are highlighted. You can also tell that the form is highlighted when the Properties Inspector becomes a forms-based Properties Inspector. 3. With the form selected, choose the Validate Form behavior, available by clicking the Add (+) button in the Behaviors panel. The Validate Form dialog appears, similar to Figure 10.30. Figure 10.30. The Validate Form dialog allows you to set fields to be verified of their content. [View full size image] The following functionality is exposed in the Validate Form dialog: Named fields: Select a named text field from this list box to set its validation rules. The naming convention in this list box is such that the type of form object is listed (text) followed by its name in quotation marks ("name", "stationid", and "description"), and the form name the object is contained in (in form "form1"). Value: Required: Selecting a form object from the Named Fields list and then checking this box guarantees that the specific form object will be required by the browser. If a user fails to add at least one character value before submitting the form, an error message appears, and the form is not submitted. Accept: Anything: Selecting a form object from the Named Fields list and then selecting this radio button instructs the browser to accept anything in the form object, even if it's left empty. If the Required check box is also selected, any value is accepted in the form object and the form object must not be left empty. Accept: Number: Selecting a form object from the Named Fields list and then selecting this radio button instructs the browser to accept any numeric value in the form object. However, the form object can be left empty. If the Required check box is also selected, a numeric value must be entered into the form object. Accept: Email address: Selecting a form object from the Named Fields list and then selecting this radio button instructs the browser to accept any value in the form object that appears to resemble an email address. However, the form object can be left empty. The formula for determining a valid email address is at least one character, an @ symbol, at least one more character, a . symbol, followed by at least one more character. If the Required check box is selected, a value must be entered into the form object that resembles an email address. Accept: Number from: Selecting a form object from the Named Fields list and then selecting this radio button instructs the browser to accept any numeric value in the form object that falls between the range of values specified in the first and second text boxes. However, the form object can be left empty. If the Required check box is selected, a numeric value must be entered into the form object that falls between the range of values specified in the first and second text boxes.