Hide or disable a control based on values in a form

Microsoft Office InfoPath 2003

Show All Show All

Hide or disable a control based on values in a form

You can use conditional formatting to hide or disable a control based on the value of another control on the form. For example, a text box for a driver's license number can be read-only unless the user enters an appropriate age into another control on the form.

  1. In design mode, select the control you want to hide or disable, and then click Conditional Formatting on the Format menu.
  2. In the Conditional Formatting dialog box, click Add.
  3. In the first box under If this condition is true, click Select a field or group.
  4. In the Select a Field or Group dialog box, select the field whose value will determine whether the control is hidden or disabled, and then click OK.

    Note  Microsoft Office InfoPath 2003 verifies a condition by checking the value of the field that is bound to the control, not the control itself.

  5. In the second and third boxes under If this condition is true, enter the rest of the condition, and then do one of the following:
    • To disable the control, select the Read-only check box. Depending on the type of control, this check box may be labeled Don't allow users to insert or delete this control or Disable this control.

      Note  To disable the controls in a section, you must disable each control in the section. Disabling the actual section only prevents users from inserting or deleting the section.

    • To hide the control, select the Hide this control check box.

Note  The information in this topic may not apply if you are working with a form designed using Microsoft Office InfoPath 2003 without the service pack installed. Learn more