How can I add text above the statements in a matrix table? | XM Community
Skip to main content
I'm trying to replicate a survey that was originally on paper, so I've been asked to keep the formatting of all the questions the same in the web version. The original document has a matrix type question with a label for the column of statement items (to the left of the scale labels, in the area that is generally blank in the upper left corner of the table.) Does anyone know how to add text in that area using some Javascript?
Try this:

```

jQuery("#"+this.questionId+" td.c1:first").html("Label Text");

```
Thanks Tom! This is exactly what I was trying to do. Just to be super picky though, is there a way to left justify the label??
> @marean said:

> Thanks Tom! This is exactly what I was trying to do. Just to be super picky though, is there a way to left justify the label??

```

var cell=jQuery("#"+this.questionId+" td.c1:first");

cell.css("text-align","left");

cell.html("Label Text");

```
Perfect! Thank you so much, Tom!!
@TomG : Can you help me modify this code to get the Label to align with the second row of the matrix (answer description) instead of the top row? Thank you!!

Hi TomG - Is there a way to make this label available for translation as well, while using the Translate survey option in qualtrics. I need to translate it in Japanese, Chinese simplified and Chinese Traditional.
Thanks in advance.


Hi TomG - Is there a way to make this label available for translation as well, while using the Translate survey option in qualtrics. I need to translate it in Japanese, Chinese simplified and Chinese Traditional.

sombwit - You can use the trick described in this post: https://www.qualtrics.com/community/discussion/comment/15542#Comment_15542


Hi everyone. Following TomG's tip, can you suggest me a way to implement exactly this text as label of the matrix? I am trying to replicate Murphy's SVO but the instruction here does not correspond with the correct layout. Thanks!
 You Receive
|
|
Other Receives




https://www.qualtrics.com/community/discussion/comment/36660#Comment_36660jQuery("#"+this.questionId+" td.c1:first").css("text-align","center").html("You Receive
|
|
Other Receives");


@TomG 

Is there a way to increase the font on: 

var cell=jQuery("#"+this.questionId+" td.c1:first");
cell.css("text-align","left");
cell.html("Label Text");

 

I’ve tried adding the items below it the script above without success.

var fontSize = 200;

and

var span = document.getElementByID("Activity");
    span.style.fontSize = "25px";

 

Thanks!


@TomG

Is there a way to increase the font on: 

var cell=jQuery("#"+this.questionId+" td.c1:first");
cell.css("text-align","left");
cell.html("Label Text");

 

I’ve tried adding the items below it the script above without success.

var fontSize = 200;

and

var span = document.getElementByID("Activity");
    span.style.fontSize = "25px";

 

Thanks!

It should be:

jQuery("#"+this.questionId+" td.c1:first").css({"text-align":"left","font-size":"25px"}).html("Label Text");

 


Leave a Reply