Hi there,
I am new to the platform and I apologize if the question is easy or a repeat. I was hoping I can get help with my custom validation quest. What I would like to do is make sure that a text entry response is within any combination of couple of strings. I tried the 'Match regex' option but was unable to do what I want. I tried adding javascript code but got lost with using the API. I hope someone can provide some guidance. Thanks in advance!
Solved
Custom validation, any combination of n strings
Best answer by TomG
@Clare,
First, you want to start your JavaScript by disabling and/or hiding the Next button. Then, when you know you have a valid response enable and/or show the Next button.
For a validation error message, I generally just update the html of the element Qualtrics uses for its validation errors (class of ValidationError).
You probably want to use a 'blur' handler on the input field to check the input then take appropriate action...show the validation error or enable/show the Next button.
View originalFirst, you want to start your JavaScript by disabling and/or hiding the Next button. Then, when you know you have a valid response enable and/or show the Next button.
For a validation error message, I generally just update the html of the element Qualtrics uses for its validation errors (class of ValidationError).
You probably want to use a 'blur' handler on the input field to check the input then take appropriate action...show the validation error or enable/show the Next button.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.