JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
Can I enter multiple variables in a single conditional statement.Asked by scottishgroupcompanies on March 19, 2015 at 11:28 AM
Our website, www.scottishstainedglass.com, collects leads from across the country. We have sales people on the ground in multiple states who work through our "typical" sales process. However in states where we do not have sales people on the ground we want a different process. I want to be able to use a conditional statement on the zip code field to redirect users to one of 2 pages.
"If" the users answers one of 5000 zip codes, they go to one page, if the users answers any other zip code, they got to a different page.
I have tried entering my list of zip codes separated by commas but that didn't seem to work. I have been able to get it to work by entering each zip code as a single condition.
Is this the only way to accomplish my goal, or is there some way to possibly enter the all the variables in a single condition?
depending on zip the page either goes to http://www.scottishstainedglass.com/thank-you-for-your-interest/
variables in different zip code www
Comma separated values in your conditions are indeed possible. Though I am not exactly sure how many entries you may have per condition. It may only allow for up to 10 or so. Unfortunately, I do not believe adding all 5000 to one condition is currently possible.
I have the same question. I need to have about 200 zip codes. How would the condition be built?
I can't seem to get it to validate the comma separated values in the condition.
I've set the condition as
If 'zip' contains (zip from coma separated value) redirect to url
If 'zip' does not contain (zip from coma separated value) skip to page
Comma separated values do indeed work in conditions, however, as previously stated, I believe there is a rather low limit on the number of values that can be added. If you are trying to add all 200 to a single condition, it will not work. I believe the maximum is 10 per condition. For your set up, you would likely need 20ish conditions with 10 zip codes per condition.
I set up a quick test form with a single condition and 3 values, all 3 values work as expected.
Enter boot, test or created in the first text box of that form and the submit button will show. All three values work from a single condition.
I tried your suggestions and it worked for the first set of 10 zip. Once I add the second set of zips, It no longer works. All zips are failing the condition. Here's an example
These are the two sets of zips I started with. I need to enter more than 200.
My logic is
If zip contains > skip to page 3
If zip does not contain > skip to page 2
Your assistance would be appreciated.
The conditions are currently set to "if all" conditions are met. Since only one zip code can be entered, it is impossible for both conditions to be met:
Change this to "if any" and the conditions should work as expected.