What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
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.
Is it possible to create Error Messages based on certain conditions?Asked by nickbh on September 18, 2015 at 11:10 AM
Examples I am thinking of are:
If I have someone for example looking to record their interests on a form I don't want them to repeat
If interestdropdown1 = Football
and ineterstdropdown2 = Football
In this case the user needs a custom message to inform them that "You cannot have 2 of the same interests" please make another selection.
Yes, you could be able to accomplish that through conditions.
Unfortunately, you would need to have as many conditions as there would need to be a single condition for single entry:
Now the better alternative is to use the Form Calculation on your form and then based on that, simply make one condition to check if the two are the same or not.
To do that you will need to take a look at the following guide: How to find Field IDs & Names
Once you do, you will be able to see how to get the form calculation tag, which we would need.
So now, we basically, just create a single condition that checks if the form calculation 1 is equal to form calculation 2.
This is how this condition looks like:
You can see how this works on this form:
- I have left both options on the form for you to inspect and see which one you prefer (I would go for the second one, but first offers more per match setting - finer tuning) :)
Thats great. I am trying to use the 2nd option (as you say) and also because I have a very large pick list. However I cannot see a way to add the action "DISABLE" Submit button. I can ONLY HIDE it. Is there a work around or is HIDE my only option?
I am glad to hear that you like it.
To use the disable option you will need to set a different option through conditions. For that we use Change Attributes of a field option in the conditions.
Once you select this option you will be able to disable submit button :)
Do let us know how it goes and if you happen to have any issues / questions along the way :)