Recording validation prompts received | XM Community
Question

Recording validation prompts received

  • 23 February 2021
  • 1 reply
  • 12 views

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?


1 reply

Badge +8

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