Hello,
I have a text entry (numeric) question that loops 4 times. I want to record the response of the 2nd loop as an embedded data field to be used in a later part of the survey. I am currently using the following code in js, but it is not working. Any thoughts on how to get the code to work?
Qualtrics.SurveyEngine.addOnPageSubmit(function() {
if("${lm://CurrentLoopNumber}" == 2) {
var res_beliefdays = jQuery("#" + this.questionId + " .InputText").val();
Qualtrics.SurveyEngine.setEmbeddedData("res_beliefdays",res_beliefdays);
}});