Javascript for counting the number of times a respondent fails the custom validation | XM Community
Skip to main content
Hi, I'm running a study in which respondents read a text message and are asked how they would respond. The options are as follows:

1. I would respond immediately; please enter your response here [text box]

2. I would not respond immediately

3. Other



I have some validation set up such that if the individual clicks on option 1, they must enter something in the text box and their entry must be either "Y" "N" or "STOP". If they enter anything else then they will get an error message.



I would like to track whether someone fails the validation as well as count the number of times someone fails it. I was wondering if anyone has any javascript code that would be useful for this and/or whether anyone has any other solutions for measuring these outcomes.



Thank you!

Found the solution in this thread https://www.qualtrics.com/community/discussion/7570/how-can-i-count-errors in case anyone is interested


Leave a Reply