How to hide/show a control based on a value in a dropdown list?
Last Update: September 21, 2018
Suppose you have a DropDownList control named "DropDownList1" that includes the following items: Value1, Value2 and Value3, and you want to make another control named "Date1" to be visible if the selected value in the "DropDownList1"is Value2.
To do that, add a new rule on the "Date1" control as follows:
- Change the Rule Name as desired.
- Change the Rule Type to Formatting.
- Change the Event Type OnChange.
- In the Condition section in the Rule Manager, add the following code:
getValue(DropDownList1) == "Value2";
- Check the Visible checkbox and choose Yes.
- Click on the Save button to save the rule.