change "total" text on constant sum question | XM Community
Solved

change "total" text on constant sum question


Badge +4
Hi,

I'd like to change the text at the bottom of a matrix constant sum question from "Total" to something else. Javscript isn't my forte--how could I do this?

Thanks!
icon

Best answer by TomG 18 July 2018, 20:57

View original

10 replies

Userlevel 7
Badge +27
> @YaelC said:
> Is there a code to change the total label in a constant sum matrix table with the Total column on the right?

Start a new thread.
Is there a code to change the total label in a constant sum matrix table with the Total column on the right?
Userlevel 7
Badge +27
@_Hannah1073,

Start a new thread and post _details_ on your specific constant sum question (e.g., settings, image, etc.).
Dear Tom, thanks for your help. Unfortunately this one does not work in my case either to override the standard label.

I used: Qualtrics.SurveyEngine.addOnload(function()
{
jQuery("label[for="+this.questionId+"_Total]").html("New Total Label");
});

Any clues?
Userlevel 7
Badge +27
> @_Hannah1073 said:
> Hi, i have the same problem but the code does not work in my case. I did it in the following way: !
>
> did i make a mistake?
>
It appears Qualtrics has made a change to the html structure since this question and answer were originally posted. Try this instead:
```
jQuery("label[for="+this.questionId+"_Total]").html("New Total Label");
```
Hi, i have the same problem but the code does not work in my case. I did it in the following way: !

did i make a mistake?
Badge +4
> @TomG said:
> Add this to the addOnload function:
> ```


Perfect, thanks very much!
Userlevel 7
Badge +27
Add this to the addOnload function:
```
jQuery("#"+this.questionId+" .c1:last").html("New Total Label");
```
Badge +4
> @TomG said:
> Is Total on the right or bottom?

It's on the bottom, by scale point. Thanks.
Userlevel 7
Badge +27
Is Total on the right or bottom?

Leave a Reply