Search code examples
validationqualtricszipcode

Qualtrics - Zip Code validation


In a survey I'm programming, there's a question I ask for their zip codes. I have a list of approved zip codes. But I don't want to format the question where I list all 200 of them.

Can anybody tell me where to start to make those listed zip codes "hidden" so when a respondent type in their code it will match what the "hidden" zip codes and will let them go to the next question (validate them to qualify). If not, they will be screened out.

Thanks!


Solution

  • Without writing code, you could do a branch for each zip code (yuck).

    Alternatively, you could write some JavaScript where you add an onblur event handler to the zip code input field that looks up the zip code in an array, then sets an embedded variable telling you whether it is valid or not. Then just check the value of the embedded variable in a survey flow branch.