Repeat labels of matrix question at bottom | XM Community
Solved

Repeat labels of matrix question at bottom


Userlevel 1
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?
icon

Best answer by mattyb513 16 August 2018, 16:15

View original

12 replies

Userlevel 7
Badge +33
labels automatically come at bottom too, can you try again with link. Unclick repeat header and than again add repeat header. It might solve.
!
Userlevel 1
Unfortunately only the scale points are repeated not the headers...!
Userlevel 7
Badge +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))'
''''''
Userlevel 1
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.!
Userlevel 7
Badge +33
Looking at your screenshot, just wanted to confirm how have you provided labels is it like completely agree </br> 1
Userlevel 7
Badge +38
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.
Userlevel 1
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.!
Userlevel 7
Badge +33
It will only repeat if u give in scale. You can add like with br tag
Userlevel 1
Ok thanks for your effort!
Userlevel 6
Badge +6
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;
}
}
```
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 "));`

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