How would I go about getting the survey to record whether a person received a validation prompt? For example, if people receive a notification for an open-ended response if it's under a character or word limit, how can I tell apart who saw this message and then kept writing from those who may have written enough to begin with and never saw the validation prompt?
Page 1 / 1
Try adding this javascript code in open-ended question and create embedded data variable "error_count" above that question block in survey flow. It'll save how many times validation prompt was shown to participant.
Qualtrics.SurveyEngine.addOnReady(function() {
var error = Qualtrics.SurveyEngine.getEmbeddedData("error_count");
error = error && error.trim().length > 0 ? parseInt(error) : -1;
jQuery('#NextButton').on('click', function() {
error++;
Qualtrics.SurveyEngine.setEmbeddedData("error_count", error.toString());
});
});
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.