Qualtrics: convert a variable using javascript and display it in text?

Suppose that qualtrics has a variable with channels (the values ​​for storing variables selected from the previous input by the respondent of the survey), how can I convert it to lower case before displaying it?

There is a java-script function .toLowerCase();, but how to change a variable in custom javascript qualtrics and pass it back to the survey text?

This link explains how to use channel-passed variables in Javascript. Let's say I define a new variable in javascript like this

// my piped variable is ${q://QID12/ChoiceGroup/SelectedAnswers}"
var selectedChoice = "${q://QID12/ChoiceGroup/SelectedAnswers}";
var selectedChoiceLower = selectedChoice.toLowerCase();

How to transfer selectedChoiceLower back to the question text?

Any ideas?

+4
source share
1

setEmbeddedData(), selectedChoiceLower (. ). .

javascript: setEmbeddedData('lower', selectedChoiceLower);

: ${e://Fields/lower}

: javascript ! Qualtrics . "" , javascript , , . . . .

+3

All Articles