I have a multiple choice question where some answer options are mutually exclusive, and I'd like to impose logic to enforce this (ideally by hiding/showing allowed options in real-time).
Here's my question and the rules:
Please select from the items below:
1) Answer choice 1
2) Answer choice 2
3) Answer choice 3
4) Answer choice 4
5) None of the above
6) Don’t know
7) Not applicable
Rules:
A. If I select "1) answer choice 1" and/or "2) answer choice 2" and/or "3) answer choice 3" and/or "4) answer choice 4"
--> Then I would not be able to select "5) None of the above", "6) Don’t know", or "7) Not Applicable"
B. If I select "5) None of the above",
--> Then I would not be able to select 1) or 2) or 3) or 4) or 6) or 7)
C. If I select "6) Don’t know",
--> Then I would not be able to select 1) or 2) or 3) or 4) or 5) or 7)
D. If I select "7) Not applicable",
--> Then I would not be able to select 1) or 2) or 3) or 4) or 5) or 6)
Well, that makes it easy! I wonder though, is there a way to uncheck the other options -- see below, I've selected (6) Don't know, but prior to that, I chose (1) Answer choice 1 ... it would be nice if Choice (1) was deselected...
To do that, you will need to use JavaScript instead of the built-in exclusive feature. Something like in
this post
but modified to render all options placed greater than 4 exclusive.