Page 15 of 25PREVNEXT

So that's how: Great InfoPath features for customizing controls

A text box that turns red based on the value entered in another text box

Conditional formatting is often used to highlight or call attention to specific, important, or sensitive information in a form.

Before we talk about hiding controls or making them read-only, let's spend a minute reviewing conditional formatting.

In InfoPath, you typically use conditional formatting to change the appearance of a control based on values users enter into your form. When you work with conditional formatting, you set conditions for formatting controls. If the conditions are met, then InfoPath changes the appearance of the control; if they aren't met, no changes take place.

Take a look at the example in the picture. In the second row, notice how the amount spent exceeds the amount budgeted? The form designer has used conditional formatting to draw attention to this fact. In this case, you can describe the condition as follows: "If the value in the Amount Spent box exceeds the value in the Amount Budgeted box, then apply red shading to the Amount Spent box."

To create conditions, you use the Conditional Format dialog box, which is accessible from the Format menu in design mode, or through the properties dialog boxes for text boxes and other controls.

Conditional formatting isn't just for applying formatting changes to controls. You can also use it to do other things that may not be so obvious — for example, hiding controls or making them read-only.

Page 15 of 25PREVNEXT