How to display multiple choice answers above question | Experience Community
Skip to main content
Solved

How to display multiple choice answers above question

  • Sep 12, 2023 8:55 PM UTC
  • 4 replies
  • 134 views

Forum|alt.badge.img+1

My research team is trying to put together a survey where participants see a picture in the center of the screen and the 4 multiple choice options are displayed around it: 2 options above the picture in 2 columns and 2 options below the picture in 2 columns. Is it possible to write a javascript that will do this?

Best answer by TomG

Set your MC question format to List->Alignment:Column->Number of columns:2. Add this JS to the question and insert the actual image id where the xxxx is:

Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#"+this.questionId+" tr:first").after(
"<tr><td colspan='4' style='text-align:center;'><img src='/ControlPanel/Graphic.php?IM=xxxx'></td></tr>");
});

 

View original

4 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Sep 12, 2023 10:14 PM UTC

Yes, you can write JavaScript to do this.


Forum|alt.badge.img+1

That’s great news! Would you be able to help me get started in writing that script? I’ve been searching through various questions in this community but couldn’t find any scripts that repositioned the answers from Qualtrics standards.


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Answer
  • Sep 13, 2023 12:58 PM UTC

Set your MC question format to List->Alignment:Column->Number of columns:2. Add this JS to the question and insert the actual image id where the xxxx is:

Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#"+this.questionId+" tr:first").after(
"<tr><td colspan='4' style='text-align:center;'><img src='/ControlPanel/Graphic.php?IM=xxxx'></td></tr>");
});

 


Forum|alt.badge.img+1

Thank you!!