Automatically populate a drop-down in a side-by-side matrix | XM Community
Skip to main content
Solved

Automatically populate a drop-down in a side-by-side matrix

  • September 28, 2018
  • 5 replies
  • 92 views

mkosterich
We are using a side-by-side matrix. If a respondent answers that they never use something in the first drop-down, how can we automatically populate the second with "I don't do this"? ! I've been told it is possible with custom Javascript, however I'm not proficient enough to code it. Any assistance with the coding would be a huge help!

Best answer by TomG

The only way to do this is with JavaScript. Add change event listeners to the frequency dropdowns that set the value of the associated painful dropdowns if "Never" is selected.
View original

5 replies

mkosterich
  • Author
  • 6 replies
  • September 28, 2018
We are using a side-by-side matrix. If a respondent answers that they never use something in the first drop-down, how can we automatically populate the second with "I don't do this"? !

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5926 replies
  • Answer
  • September 30, 2018
The only way to do this is with JavaScript. Add change event listeners to the frequency dropdowns that set the value of the associated painful dropdowns if "Never" is selected.

MohammedAli_Rajapkar
QPN Level 5 ●●●●●
Forum|alt.badge.img+20
I am not sure, if you like this approach but thought of sharing... The other way which you can try before implementing on your main survey (to check how the data is appearing) is to use the Drill-down question type. This question type gives you multiple drop-down box and selection of one drop-down will filter the second one. So, for "Never" you will just have to keep "I don't do this" and for the rest of the option, you should keep the rest 4 painful option. Please refer below documentation on drill-down question type: https://www.qualtrics.com/support/survey-platform/survey-module/editing-questions/question-types-guide/specialty-questions/drill-down/ Please thread to check how you can position the drill-down question (please refer @PraDeepKotian_Ugam comment) https://www.qualtrics.com/community/discussion/comment/7093#Comment_7093

mkosterich
  • Author
  • 6 replies
  • October 1, 2018
> @TomG said: > The only way to do this is with JavaScript. Add change event listeners to the frequency dropdowns that set the value of the associated painful dropdowns if "Never" is selected. Thanks for the recommendation Tom! Unfortunately I don't have much experience with JavaScript, would you be able to share code that I could use?

LaurenK
Former XM Community Team Member
Forum|alt.badge.img+13
  • Former XM Community Team Member
  • 900 replies
  • October 9, 2018
Hey @mkosterich! We actually have a Developer Corner in the community that is reserved for custom code questions. Therefore, we recommend asking your question in that section instead so coders and programmers are more likely to answer your question. P.S. They might assume that you already have a basic knowledge of programming and how to integrate it into Qualtrics. If you do not, we recommend checking out W3Schools and our pages on Adding Custom CSS and Adding JavaScript to get a basic understanding!

Leave a Reply