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

    Show message when one number is larger than the other

    Asked by puntotecnologico15 on June 05, 2015 at 05:59 AM

    Hi, I would like have a alert message when the numeric value in one field is bigger that the value in other field.

    If  this  conditions is true it should be shown an alert message.

    Please tell me the instruction.



  • Profile Image

    Answered by Boris on June 05, 2015 at 10:31 AM

    Hello Nino.

    We do not have a way to show "alert message", but you can show and hide regular Text fields when one number is bigger than another. You can achieve this by using Conditional Logic to Show/Hide a form field based on a value in another field.

    I have created a small demo of the feature here:

    http://form.jotformpro.com/form/51554555634964 (You can clone it to take a closer look.)

    Basically, we use two fields for the numbers, number 1 and number 2. These would be the fields that you probably already have on your form, which you would like to compare.

    You also need a regular Text field that will hold the message which you would like to present when the conditions are met.

    Then, we add a Form Calculation widget to your form, and set it up to calculate the difference between Number 2 and Number 1.

    You can make this Calculation field hidden, so that it is not shown on the form.

    Then, we create a condition, by going to Setup & Embed > Conditions > Show/Hide a form field, and select in that conditions that the message (Text field) is hidden, unless the Number 2 is bigger than Number 1.

    We do this by seemingly complex setting of rules, that:

    If Calculation is Less than zero (0), is Equal to zero, or if it is Empty, we hide the message (Text field). You can add these multiple rules by using the Add New Rule button, marked with 3 in the image.

    That is it. Please test the demo form linked above, and let us know if you need further guidance with this. We will be happy to help.