Custom code answer choices | XM Community
Skip to main content
Hi, I want to make a question in a survey with 9 answer choices and rules on how the answers choices can be combined like:

• 1 to 5 can be combined with each other

• 6 to 7 can not be combined with each other

• 1 to 5 can not be combined with 6 to 7

• 8 and 9 can not be combined with anything else

• It is ok that the respondent does not respond at all (i.e. empty is possible)



How can I use Javascript to make this possible?
What is the difference between 6, 7 and 8, 9? From your description it seems like all four are exclusive. If that's the case, you don't need any JavaScript, just use a multi-select and make 6, 7, 8, and 9 exclusive.
Thanks for following up.



To simplify my question, let’s assume that the question is a purchase intention question, to which we have 10 different answer modalities

1. Item A

2. Item B

3. Item C

4. Item D

5. Item E

6. Bundle F

7. Bundle G

8. Bundle H

9. Nothing

10. I don’t know



Where 1-5 are items (e.g. car options) that are included into bundles 6-8 (e.g. bundle of car options). What I would like to do is:

- Authorize people to select multiple items (1-5)

- Forbid people to select both items (1-5) and bundles (6-8)

- Forbid people to select several bundles (6-8)

- Forbid people to select both 9 and 10

- Forbid people to select 9 or 19 in combination with anything else



Does this make more sense to you now?
> @Htc_ said:

> Does this make more sense to you now?

Yes, it makes sense. The answer is still the same...use a multi-select and make 6 through 10 exclusive.

Leave a Reply