Microsoft Office Online
Sign in to My Office Online (What's this?) | Sign in

 
 
Microsoft Office FrontPage
Search
Search
 
Check for updates: (c) Microsoft
Office downloads
 
 
 
Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.

Email this linkEmail this link Printer-Friendly VersionPrinter-Friendly Version Bookmark and ShareShare
Set rules for allowing data in fields
 

To make your forms more useful, you can control what site visitors enter into certain form fields by setting data entry rules (also called validation). You can apply data entry rules to drop-down boxes, text boxes, text areas, and option buttons.

  1. In Page view, at the bottom of the document window, click Design Button image.

  2. Do one or more of the following:

    ShowSet 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 Drop-Down Box Properties dialog box, do one or more of the following:

      ShowAllow multiple selections from a drop-down box

      1. To allow multiple selections, click Yes.
      2. Click Validate.
      3. Type values in the Minimum Items and Maximum Items boxes, and then click OK.

      ShowUse the first option in the drop-down box to provide instructions to site visitors.

      If you use the first option to display instructions, such as "Select an option," do the following to make that first option unavailable:
      1. Click Validate.
      2. Select the Disallow first item check box.

      ShowRequire site visitors to make a selection from a drop-down box

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

      ShowDisplay a message to site visitors who have not met the requirements you set

      1. Click Validate.
      2. In the Display Name box, type a brief reminder to site visitors about meeting your requirements. For example, they would see "Select an option."

    ShowSet data entry rules for a text box or text area

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

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

    2. In the Text Box Properties or the TextArea Box Properties dialog box, click Validate, and do one or more of the following:
    3. ShowSpecify the type of data to allow in a text box or text area field

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

      • Select No Constraints from the Data type list.
      • Select Text from the Data type list, and then under Text format select the types of characters to allow in the field —  Letters, Digits, Whitespace (spaces, tabs, carriage returns, and line feeds), or Other (different characters, such as commas and hyphens). If you select Other, type the characters in the box.
      • Select Integer from the Data type list, and then under Numeric format specify to use a comma, period, or space to group numbers.

        You can disallow any punctuation or spacing, or allow periods in groups of numbers as in 123.456.789, allow commas as in 123,456,789, or allow spaces as in 123 456 789.

      • Select Number from the Data type list, and then under Numeric format specify the character to allow for Grouping and the character to use for Decimal points.

        You cannot use the same character for both Grouping and Decimal. For example, if you use a period as a decimal point, you cannot use a period for grouping. Instead, you could use the comma, space, or no punctuation for grouping, for instance: 1,234.56, or 1 234.56, or 1234.56.

      ShowSpecify a value limitation

      1. Under Data value, select the Field must be check box.
      2. In the Field must be list, click a data value.
      3. In the Value box, type the value for the constraint, for example, you might require that a value in the field be greater than 10.
      4. To specify a second constraint, select the And must be check box, click a condition, and then type a 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.

      ShowRequire site visitors to type an entry in a text box or text area field

      1. Under Data length, select the Required check box.
      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.

      ShowDisplay a message to site visitors who have not met the requirements you set.

      In the Display name box, type a brief reminder to site visitors about meeting your requirements. For example, they would see "Select an option."

    ShowSet 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:

      ShowRequire site visitors to select an option button

      Select the Data required check box.

      ShowDisplay a message to site visitors who have not selected an option button.

      1. Select the Data required check box.

      2. In the Display name box, type a brief reminder to site visitors about meeting your requirements. For example, they would see "Select an option."

    Note  When you set a rule for the selection of one option button at a time, the rule applies to all option buttons in the group.

Note  To test the functionality of your form, you must first publish your Web site to a Web server.

advertisement