- DPCREATEAsked on November 03, 2015 at 04:24 AM
I have 2 number fields, i need to prevent the value entered in num2 being greater than num1
How can i do this?
- JotForm UI DeveloperberilAnswered on November 03, 2015 at 09:09 AM
As far as I know, it is not possible with JotForm. However, you can add a Hover Text as o solution.
Here is how it works:
If you have any question or issues, please do not hesitate contacting us. We will be glad to assist you.
- JotForm SupportabajanAnswered on November 03, 2015 at 10:12 AM
In addition to my colleague's workaround, you could add a text element containing an error message to the form and then setup a condition to both show the message and hide the submit button whenever num 2 is greater than num 1. (Once the submit button of a jotform is hidden, submission isn't possible).
If you need help implementing this setup, please inform us.
- paul_xAnswered on November 03, 2015 at 11:29 AM
Hi everyone !
I used a spinner field because it offers both the functionality of a regular spinner (increase & decrease buttons) + you can manually enter the number in the field just like what you do with a regular text box or number field.
This is the end-result of the live form I did (this can be cloned).
* #2 spinner value is programmed not to exceed the value of #1 - even if you press the up-spinner button (increment).
* And if #1 = #2, and you decrease the value, the value of #2 then = #1.
* Else, #1 & #2 values are independent of each other.
(hopefully the conditions are error-proof)
Conditions used in this sample form:
Hope this helps.
- victorAnswered on November 03, 2015 at 01:50 PM
Thanks @paul_x, this is also another of accomplish this task.
Thanks for the sample form.