Add an illustrative example in matrix table | XM Community
Skip to main content
Solved

Add an illustrative example in matrix table

  • October 28, 2023
  • 6 replies
  • 90 views

Forum|alt.badge.img+1

Hello, 

I would like to add a row into a matrx table  (statement) that provides an illustrative example of  how the question might be answered. I found a very similar question here: 

However, some time has passed, and I wonder if there is another way to do it besides adding a screenshot?

I am quite new to Qualtrics, so hope I didn’t miss something very evident.

 

Thank you very much!

Best answer by Deepak

@mvidal 

Try including below code in JavaScript section
 

Qualtrics.SurveyEngine.addOnload(function() {
jQuery('td.c1').append('<div><i>Example:</i> Winter Wheat</div>');
jQuery('th.c4').append('<div><i>Example:</i> 25 </div>').css('padding', '0px');
});

Hope it helps!

6 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • October 28, 2023

@mvidal,

What the original poster asked for was to be able to disable the first row after specifying a default choice. You can do that like this (if you aren’t using simple layout):

Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#"+this.questionId+" tr.ChoiceRow:first [type=radio]").prop("disabled",true);
});

 


Forum|alt.badge.img+1
  • Author
  • 3 replies
  • October 30, 2023

Thanks a lot @TomG !

However, I am not sure if I did it correctly. The respondent can still in theory overwrite the example in the first row, and when doing a “carry forward” of the statements to another question, the example (as a default choice in the first row) appears in the follow up question. I am not sure whether I am explaining myself, or maybe this is well beyond my abilities haha 

Thank you!


Deepak
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+46
  • 1555 replies
  • October 30, 2023

@mvidal 

can you provide illustrations of what is required?


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • October 30, 2023

Thanks a lot @TomG !

However, I am not sure if I did it correctly. The respondent can still in theory overwrite the example in the first row, and when doing a “carry forward” of the statements to another question, the example (as a default choice in the first row) appears in the follow up question. I am not sure whether I am explaining myself, or maybe this is well beyond my abilities haha 

Thank you!

If the radio buttons in the first row aren’t disabled, my guess is you are using simple layout.

If you need carry forward, you should probably create a separate matrix question for the example.


Forum|alt.badge.img+1
  • Author
  • 3 replies
  • November 24, 2023

Thanks a lot for yor help, and apologies for my late reply. Here is an illustration of what I would like to accomplish (I am not sure if it is possible). Thanks again!

 


Deepak
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+46
  • 1555 replies
  • Answer
  • November 25, 2023

@mvidal 

Try including below code in JavaScript section
 

Qualtrics.SurveyEngine.addOnload(function() {
jQuery('td.c1').append('<div><i>Example:</i> Winter Wheat</div>');
jQuery('th.c4').append('<div><i>Example:</i> 25 </div>').css('padding', '0px');
});

Hope it helps!