Custom validation for text entry form | XM Community
Skip to main content

Dear Qualtrics community,
I just encountered a problem setting up a survey and I have no idea what I could be doing wrong. Maybe any of you does?
I have a question where I ask my participants a question about two people. Beneath that, I have two pictures and next to each one there's a text entry field of the type "form". I want participants to insert a percent value between 0 and 100 here. I set the custom validation to "request response" so that participants are encouraged to answer but can't be forced to. Next, I added a custom validation to make sure both text entries are a value that is less or equal to 100 (see picture).
Furthermore, I edited the form fields to be short and take a numerical value.
Unfortunately, when viewing the block, this question does not accept my entries. What's going on here? :D

Thanks in advance
Annie
Unbenannt.PNG

The custom validation is creating the problem, because it is failing if there is no answer. Since empty is not a number.
Add OR conditions which allows validation to pass if the fields are empty.
Alternatively, you can set default choices to "0", so that if your respondents don't touch a field, the validation passes.
Hopefully that should fix it.


Thanks so much for your reply!
I think I read about a similar problem in another thread, it doesn't really make sense to me though. I do understand your answer, but while testing this block, it was not the case that I tried to leave the fields empty. Why wouldn't the validation let me pass when I entered "50" and "50", for example?
I just added OR conditions for empty fields and now the question works as supposed to. So thank you for your solution 🙂 I just don't understand why there was a problem at all...


I'm glad my suggestion helped, but 50 and 50 should have worked without it. Adding the OR conditions should have no effect on it. Just check everything once again to ensure you aren't overlooking any validation.


Thanks for replying again.
I just played around some more: When I delete my validation INSIDE the form question itself (as stated above, I set the forms to be "short" and take a "numerical value"), 50 and 50 works.
This, again, makes no sense to me. But well, at least it works...


Leave a Reply