Repeat labels of matrix question at bottom | XM Community
Skip to main content
Solved

Repeat labels of matrix question at bottom


Matrix questions offer the option to repeat the headers at the bottom. However headers are only scale points not the labels above. We would also like to repeat the labels at the bottom of the matrix. Is there any way to do so?

Best answer by mattyb513

Here you go: https://qualtricssfi.az1.qualtrics.com/jfe/preview/SV_bEs5PXo5jcjfLDf?Q_SurveyVersionID=current&Q_CHL=preview ```javascript Qualtrics.SurveyEngine.addOnload(function() { var qid = '#' + this.questionId; jQuery(qid + ' .ChoiceStructure').append('<tbody class="secondary-labels"></tbody>'); jQuery(qid + ' .ColumnLabelHeader').clone().appendTo(qid + ' .secondary-labels'); }); ``` ```css @media (max-width:730px) { .secondary-labels { display:none; } } ```
View original

12 replies

PeeyushBansal
Level 6 ●●●●●●
Forum|alt.badge.img+39
  • Level 6 ●●●●●●
  • 1144 replies
  • August 16, 2018
labels automatically come at bottom too, can you try again with link. Unclick repeat header and than again add repeat header. It might solve. !

  • Author
  • 18 replies
  • August 16, 2018
Unfortunately only the scale points are repeated not the headers...!

MohammedAli_Rajapkar
QPN Level 5 ●●●●●
Forum|alt.badge.img+20
Check the attach project... to repeat the question label please place the below code in JavaScript onReady section '''''' var Qid; Qid = this.questionId; jQuery("#" + Qid + " .QuestionText").clone().appendTo(jQuery("#"+Qid))' ''''''

  • Author
  • 18 replies
  • August 16, 2018
Thanks for the attached example. However these are still the scale points being repeated, not the labels that are displayed above the scale points as in my question as in above's screenshot.!

PeeyushBansal
Level 6 ●●●●●●
Forum|alt.badge.img+39
  • Level 6 ●●●●●●
  • 1144 replies
  • August 16, 2018
Looking at your screenshot, just wanted to confirm how have you provided labels is it like completely agree </br> 1

bstrahin
Level 6 ●●●●●●
Forum|alt.badge.img+38
  • Level 6 ●●●●●●
  • 638 replies
  • August 16, 2018
You could change your scale point to include the label "completely agree < br / > 1", 2, 3, 4, "do not agree at all < br / > 5" Just double check your recode values are 1-5. Adding the text to the scale point won't mess up your statistics calculations because you can download values instead of labels.

  • Author
  • 18 replies
  • August 16, 2018
Numbers are scale points, texts (completely agree) are labels. Including text in scale points does not work because columns are no longer equally distributed on mobile, so want to keep text as labels.!

PeeyushBansal
Level 6 ●●●●●●
Forum|alt.badge.img+39
  • Level 6 ●●●●●●
  • 1144 replies
  • August 16, 2018
It will only repeat if u give in scale. You can add like with br tag

  • Author
  • 18 replies
  • August 16, 2018
Ok thanks for your effort!

mattyb513
Level 4 ●●●●
Forum|alt.badge.img+6
  • Level 4 ●●●●
  • 163 replies
  • Answer
  • August 16, 2018
Here you go: https://qualtricssfi.az1.qualtrics.com/jfe/preview/SV_bEs5PXo5jcjfLDf?Q_SurveyVersionID=current&Q_CHL=preview ```javascript Qualtrics.SurveyEngine.addOnload(function() { var qid = '#' + this.questionId; jQuery(qid + ' .ChoiceStructure').append('<tbody class="secondary-labels"></tbody>'); jQuery(qid + ' .ColumnLabelHeader').clone().appendTo(qid + ' .secondary-labels'); }); ``` ```css @media (max-width:730px) { .secondary-labels { display:none; } } ```

  • 0 replies
  • August 16, 2018
Hello @cloof , Just add the following code in the js(onready) option of matrix question: `jQuery("#" +this.questionId + " table > thead > tr.ColumnLabelHeader").clone().insertAfter(jQuery("#" +this.questionId +" table > tbody > tr.bottom "));`

  • 2 replies
  • October 22, 2020

Hi, these codes are working for me. However, instead of cloning the question or label at the bottom, I am interested in having it appear every time the headers appear (every 8 questions or so). That way, the respondents will be able to reference the question with each answer choice in a long matrix. Does someone know the javascript line to enter to make that happen? Thank you in advance


Leave a Reply