The enablewhen
tag and is used to enable or disable a question when a specified condition is true. The script will work on any question type, open or closed-ended. Conditions can be based on same-page respondent input, or based on questions from earlier in the survey.
Syntax
enablewhen: Logical Condition
Examples
Enable
In the example below, Q8A starts off as disabled on page load and remains so when options 1 - 6 are selected for Q8. Selecting option 97 enables Q8A.
Disable
Disabling questions is also possible using enablewhen
. If the specified condition returns false on page load, enablewhen
will keep the question enabled. But if the condition does return true, enablewhen
will disable the question and prevent input. In the example below, Q9A is enabled, and remains enabled for answer responses 1 - 6 at Q9. Selecting response 99 disables Q9A.
The enablewhen
tag replaces now-deprecated enableWhenChecked
and disableWhenChecked
scripts.
Comments
0 comments
Please sign in to leave a comment.