Question
Using .getChoiceAnswerValue(); for a question other than 'this'
Hi everyone,
If you have 3 questions on the same screen, how do you use .getChoiceAnswerValue(); to capture the values from the other questions? I cannot seem to get it to work! Here is an example to clarify what I mean:
DESC [descriptive item]
How do you feel about the following items?
Q2
Dogs
1: Good
2: Bad
Q3
Cats
1: Good
2: Bad
I have javascript on the DESC variable to try capturing the values selected at Q2 and Q3 OnPageSubmit, but this does not seem to work correctly.
Qualtrics.SurveyEngine.addOnPageSubmit(function()
{
var q2= document.getElementById('QID2').getChoiceAnswerValue();
var q3= document.getElementById('QID3').getChoiceAnswerValue();
console.log(q2);
console.log(q3);
});
This throws an error saying .getChoiceAnswerValue is not a function.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
