Set rules for allowing data in fields

In Page view, do one or more of the following:

Set data entry rules for a drop-down box

  1. Double-click the drop-down box for which you want to set validation rules.

    Be sure to double-click the drop-down box itself, not the Submit or Reset button.

  2. In the Dropdown Box Properties dialog box, do one or more of the following:

    To require the site visitor to make a selection from this drop-down box

    1. Click Validate.
    2. Select Data required, and then click OK.

    To allow multiple selections for the drop-down box

    1. Select Yes next to Allow multiple selections.
    2. Click Validate.
    3. Type values in the Minimum items and Maximum items boxes, and then click OK.

    To disallow the first item from being selected— for example, disallow the first item if it is an instruction, such as "Select an item."

    1. Click Validate.
    2. Select Disallow first item.

    To display a message if the visitor submits the form and does not meet the requirements you have set for the drop-down box.

    1. Click Validate.
    2. In the Display name box, type a name to identify the drop-down box for the site visitor. For example, the site visitor would see "Please enter a value for the DisplayName field."

Set data entry rules for a text box or text area

  1. Double-click the text box for which you want to set validation rules.

    Be sure to double-click the text box itself, not the Submit or Reset button.

  2. In the Text Area Properties or Text Box Properties dialog box, click Validate.
  3. Then do one or more of the following:

    To select the type of data to allow in the field

    In the Data type list, do one of the following:

    To require that a site visitor type an entry in this text box field

    1. Under Data length, select Required.
    2. To specify the minimum number of characters to allow in the text box, type a value in the Min length box.
    3. To specify the maximum number of characters to allow in the text box, type a value in the Max length box.

    To specify a value constraint, such as requiring the value in the field to be greater than 10

    1. Under Data value, select Field must be.
    2. Click the condition from the corresponding list.
    3. In the Value box, type the value for the constraint.
    4. To specify a second constraint, select And must be, then specify a condition and value.

    Note   The validation rule will use numerical comparisons if the data type is Number or Integer, and alphabetical-order comparisons if the data type is Text or No Constraints.

    To display a message if the site visitor submits the form and does not meet the requirements you have set for the text box

    In the Display name box, type a name to identify the text box for the site visitor. For example, the site visitor would see "Please enter a value for the DisplayName field."

Set data entry rules for an option button

  1. Double-click an option button in the group for which you want to set a rule.

    Be sure to double-click the option button itself, not the Submit or Reset button.

  2. In the Option Button Properties dialog box, click Validate.
  3. Then do one or both of the following:

    To require the site visitor to select one of the option buttons

    Select Data required.

    To display a message if the site visitor submits the form without selecting a option button from that group

    1. Select Data required.

    2. In the Display name box, type a name to identify the option button group for the site visitor. For example, the site visitor would see "Please select one of the DisplayName options."

Notes