How to add both % and labels to slider scale questions? | XM Community
Skip to main content

Hi, 

I’m trying to have both labels and % at the extremes of a slider scale but I somehow end up with doubling both. I can only properly use either % or labels at the extremes because otherwise it looks like this: 

I’m using the following javascript code for the % at the extremes: { jQuery("#"+this.questionId+" .first").text((jQuery("#"+this.questionId+" .first").text()+"%").trim().replace(" ",""));
jQuery("#"+this.questionId+" .last").text((jQuery("#"+this.questionId+" .last").text()+"%").trim().replace(" ",""));}

How can I have both the less/more valuable and the % point for the extremes without the doubling?

Thank you in advance!

if below preview works for you, then try solution.
 

Solution:

first set the labels of 3 scales (first middle and last).
 

 

Then paste the below code under javaScript notepad to replace -100 with -100% and 100 with 100%.

Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
jQuery("#"+this.questionId+" .numbers .first").text("-100%");
jQuery("#"+this.questionId+" .numbers .last").text("100%");
});

 


Dear Arun Kumar Dubey, 

your solution worked perfectly! Thank you so much!

Best, 

Max 


Dear Arun Kumar Dubey, 

your solution worked perfectly! Thank you so much!

Best, 

Max 

Great, all the best @Max33 !!


Leave a Reply