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.


  • Profile Image

    How Do I Prevent the Value Entered in a Number Field from Being Greater than That Entered in Another Number Field?

    Asked by DPCREATE on November 03, 2015 at 04:24 AM

     

    Hi 

    I have 2 number fields, i need to prevent the value entered in num2 being greater than num1 

    num 1 

    num 2

     

    How can i do this?

     

    thanks

    greater than compare numbers not greater than compare field values less than compare values conditions
  • Profile Image
    JotForm Support

    Answered by beril on November 03, 2015 at 09:09 AM

    Hi,

    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.

  • Profile Image
    JotForm Support

    Answered by abajan 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).

    Here's a form demonstrating the functionality. If you clone it you'll see it contains the following condition:


    If you need help implementing this setup, please inform us.

    Cheers

  • Profile Image

    Answered by paul_x 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.

     

    - Paul

  • Profile Image

    Answered by victor on November 03, 2015 at 01:50 PM

    Thanks @paul_x, this is also another of accomplish this task.

    Thanks for the sample form.