I have a problem setting the embedded data based on the multiple choice questions.
I defined k1, k2, k3, k4 and k5 in Survey Flow.
In the following questions, ${e://Field/k1} does not return anything. It works perfectly for ${e://Field/k2}, ${e://Field/k3} and so on.
Do you have any idea?
Qualtrics.SurveyEngine.addOnPageSubmit(function(type)
{
var that = this;
if(type == "next")
{
var arr = that.getSelectedChoices();
for(var t = 1;t<=arr.length+1;t++){
var h = t-1
Qualtrics.SurveyEngine.setEmbeddedData('k'+t,that.getChoiceVariableName ( arr[h]) );
}
}
});
It seems that the problem is with that.getChoiceVariableName ( 1 ) I mean when arr[h]=1. Anyone seen this before?
Be the first to reply!
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.