Dear community,
for my survey, I have a constant sum question which needs to sum up to 100%.
As an answer type, I chose the slider.
Now, I want to add a % sign after each number on the scale. Does anyone know how to do it? Is there a Java script available?
Thank you very much!!
Page 1 / 1
hi Sabine_sn
you could try this JavaScript
Qualtrics.SurveyEngine.addOnload(function()
{
//add the percentage sign
let ri = document.getElementsByClassName('ResultsInput')
for(i=0;i
if(ri[i].attributes.type.nodeValue == "text"){
ri[i].insertAdjacentHTML('afterend', ' %
}
}
//decrease size of the input field so that there is no break between field and %
let ip = document.getElementsByTagName('input')
for(i=0;i
ip[i].style.width = "2.2em";
}
}
});
Best regards
Rudi
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.