Binding Visibility To Tags

The standard way to control visibility of Web Page elements is to create tags and use the Visible property of the elements.

Note: Dynamically creating controls is not supported.

For example, on a Web Page, there is a Data Inputs On/Off CheckBox and a collection of Numeric Entry elements that are used to adjust values.

The Numeric Entry elements should disappear when the CheckBox is unchecked.

  1. Add a CheckBox and Numeric Entry elements that you want to hide.
  2. In the Tag Manager, create a tag called hidden.controls; it should be Boolean type, set to True by default (in this example True makes the element visible).

  3. Select a Numeric Entry element and bind its Visible property to hidden.controls.

    1. Click the next to Visible.

    2. In the Expression Builder, bind the property to $hidden.controls and then click OK.

    3. The icon indicates that the Visible property is now bound to $hidden.controls.

  4. Select your CheckBox and select On Changed from the Properties.

  5. In the CheckBox.change script, enter the following: $hidden.controls = !$hidden.controls;

  6. To test that it works, put your project in deployed mode, and uncheck the CheckBox; the Numeric Entry elements should disappear when unchecked.