Hide a control based on values in a form
You can use conditional formatting to hide 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 hidden unless the user enters an appropriate age into another control on the form.
Note The following controls can have conditional formatting: text boxes, rich text boxes, sections, optional sections, repeating sections, repeating tables, and expression boxes.
- In design mode, select the control you want to hide, and then click Conditional Formatting on the Format menu.
- In the Conditional Formatting dialog box, click Add.
- In the first box under If this condition is true, click Select a field or group.
- In the
Select a Field or Group dialog
box, select the field whose value
will determine whether
the control is hidden, 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.
- Enter the rest of the condition.
- Select the Hide this control check box.