Hello!
I am trying to create a highlight question with the text coming from the displayed choice of a previous question. I have learned a lot from the community and figured out the basic logic is to first make a placeholder in the highlight text and then replace it with the piped text. But I have no previous experience with javascript and just tried to make some code that could be totally wrong (not working).
I was wondering if there is anyone who could help me with it. Thanks a lot!
Qualtrics.SurveyEngine.addOnload(function()
{
var text1 = "${q://QID2/ChoiceGroup/DisplayedChoices}";
var elems = document.getElementsByClassName('HLTextWord');
jQuery("#"+this.questionId+" span.HLTextWord").replace( elems,text1);
/*Place your JavaScript here to run when the page loads*/
});
Best answer by ChiragK
View original