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

    CONDITIONAL LOGIC GREATER OR SMALLER

    Asked by nex_US on November 29, 2013 at 05:40 AM

    Hi to all, in my form i want to compare two fields:

     

    Volume Weight

    Real Weight

     

    If Volume Weight is greater than Real Weight show Volume Weight

    If Real Weight is greater than Volume Weight show Real Weigh

     

    Greater or smaller doesn't exist in the conditional logic option, so how can i?

     

    Thank You and good work.

    compare greater than
  • Profile Image
    JotForm Support

    Answered by TitusN on November 29, 2013 at 06:57 AM

    Hi nex_US,

    Conditional Logic gives you more features than are apparent sometimes. 

    Please take a look at this form and let me know if its what you are looking for. 

    If it is, this is how you create conditions to compare two numbers. You may clone the form to look at the calculation field and conditions set on the form. 

    1. Create a calculation field for the two numbers that returns the "average"

    2. Create a calculation field (call it "comparative", if you will) that subtracts the "Average" from the "Volume Weight"

    3. Add a conditional rule that hides the "Volume weight" should "comparative" contain a "-"

    4. Add a conditional rule that hides the "Real weight" should the "comparative" field be filled, and not contain a "-". Your rules should look like this when you are done: 

     

    I hope this gets your wheels turning. You can include a button that refreshes the page when the user enters the values for comparison. 

    Let me know if this helps. 

     

    Regards, 

    Titus