Get Answer from Side-by-side in javascript | XM Community
Skip to main content

Hi,
suppose that I have a single side-by-side question, where subjects can decide between Option A and B. How would I get their selection ("A" or "B") as a string into my javascript?
(What I had so far, were only text entry questions, on which i used var answer1= parseInt("${q://QID17/ChoiceTextEntryValue} ");)
Thanks for your help,
Sabrina

Assuming you are referring to the first column of the side-by-side it would be:
${q://QIDXX%231/ChoiceGroup/SelectedChoicesForAnswer/1}
The easiest way to get the correct pipe string is to click on Question Text and use the Piped Text menu.


Thanks Tom, that's what I was looking for :)


Leave a Reply