Setting a Default Choice Based on the Answer to a Previous Question | XM Community
Question

Setting a Default Choice Based on the Answer to a Previous Question

  • 12 August 2019
  • 3 replies
  • 265 views

Userlevel 5
Badge +33
My survey contains a dropdown list question followed by a multiple choice, single answer question, with different answer choices on each question. I would like it to be set up so that if the respondent selects Choice 1, Choice 2, or Choice 3 from the dropdown list question, set the default choice on the following question to a certain option; if they choose Choice 4, Choice 5, or Choice 6 from the dropdown list question, set the default choice on the following question to a different option; and so on. Ideally I would like that second question to be hidden from the respondent. Is this possible?

3 replies

Userlevel 6
Badge +27

Add option display logic on each option of following question. In the default choice option of the following question, select all options. Now use below JS to hide the following questions:

jQuery("#"+this.questionId).hide();

 

Userlevel 7
Badge +61

Good afternoon from a sunny Sweden!

Not knowing greater details of what options there are etc. I would say you can just use the basic display logic and add a page break between the first and second questions, and then add the one you want preselected as the “default choice”.

But it all depends on how complex it is in general :)

 

Best regards

-Mattias

Userlevel 4
Badge +18

@jflowers1 - Looks like you don’t want the second MCQ question to be displayed at all. Can’t we get rid of it and just use an embedded data field to set the value?  This can be done either using JS or survey flow branch logic. 

Leave a Reply