Add label to the right of Star-Scale Question | XM Community
Skip to main content
Hi All,



I'm working with the scale question and want to get a second label added to the right of the scale. I wasn't able to find an option for this, is there a way to create a code for this?



Thanks in advance!



!
You will want to insert some JS into the question.



Click the gear icon (Advanced Question Options) to the left of the question. Select "Add JavaScript".



Insert the following where appropriate under the "Qualtrics.SurveyEngine.addOnload..." section.



<code>Qualtrics.SurveyEngine.addOnload(function()

{

var questionId = this.questionId;

var choiceInputs = $$('#'+this.questionId + ' .ChoiceStructure input');

for (var i=0; i < choiceInputs.length; i++)

{var choiceInput = choiceInputs[i]; try

{if (choiceInput && choiceInput.parentNode)

{choiceInput.parentNode.appendChild(QBuilder('span',{},'after star text here'));

}

}

catch(e)

{

}

}

}); </code>
That worked flawlessly.



Thanks so much!



Leave a Reply