The enablewhen
tag enables or disables a question based on a specified condition.
Try it!
Details
-
enablewhen
works with any question or table type. - It accepts logical arguments, such as conditions, as its input.
- Conditions can be based on input from the same page or from earlier questions in the survey.
-
enablewhen
can also be used to target and enable specific rows or columns in tables. - Responses are not required for disabled fields in tables.
Additional examples
Using 'enablewhen' with tables
In the example below, the advanced table uses different question types: a dropdown menu for row 1 and a text entry field for row 2. If options 1 or 2 are selected in row 1, row 2 is activated. If option 98 ("Don't know") is selected, row 2 is disabled.
Incorporating an iterative reference
To disable certain columns or rows across the entire table based on another row or column's response, use the __RID__
(row ID) and __CID__
(column ID) references. For instance, if "Do not purchase" is selected in any row of the first column, the second column will be disabled for that row.
Comments
0 comments
Please sign in to leave a comment.