I'm using JS to store embedded data (code below). It seems to work, as I am able to embed the data in the survey. However, when I export the survey responses the embedded data variable is empty. I created a variable in the survey flow before the JS code was applied (attached as an image), but it still doesn't work. Any idea what I'm doing wrong?
Here is the code:
Qualtrics.SurveyEngine.addOnload(function()
{
jQuery('.QuestionOuter').css('display','none')
var firstName = "${e://Field/firstName}";
});
Qualtrics.SurveyEngine.addOnReady(function()
{
jQuery('input[type="checkbox"]').prop('checked',true);
var qid= this.questionId;
Qualtrics.SurveyEngine.setEmbeddedData('firstName',String(jQuery('#'+qid).find('.Selection').eq(0).text()));
jQuery('#NextButton').click();
});
Here is how I created the embedded data variable:
Best answer by rondev
View original