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

    Prevent users from submitting the form when both fields data are not the same

    Asked by couragerenewal on June 09, 2014 at 05:12 PM

    I would like to ask the following type of question.

    1. HOW MANY FRUITS DID YOU EAT TODAY? [_X_]

    2. HOW MANY OF EACH FRUIT?
    Apples [_a_]
    Bananas [_b_]
    Oranges [_c_]
    Watermelon [_d_]

    And I want it so that they cannot submit the form unless (a + b + c + d = X)

    With the calculation and conditions tools available, is this possible?

     

    PS. The form I'm trying to do this for is here, and it's the final prompt about identifying primary professions.

    prevent submit field matching data matching
  • Profile Image
    JotForm Support

    Answered by Welvin on June 09, 2014 at 07:03 PM

    Hi,

    We will look into this one and get back to if we find the possible way. I've tried using math functions, but no luck so far.

    Thanks

  • Profile Image
    JotForm Support

    Answered by jonathan on June 09, 2014 at 07:19 PM

    @ couragerenewal

    Hi,

    It is actually possible using Calculation and Condition.

    Please test this form http://www.jotform.me/form/41597190072456

    In my demo form, you have to make sure that the total of All individual fruits should match the "fruits eaten"

    Example:

    Hope this help. Inform us if you need further assistance.

    Thanks!

  • Profile Image
    JotForm Support

    Answered by jonathan on June 09, 2014 at 07:34 PM

    Btw, I should have shared also the calculation and condition I did. So, here it was

    Calculation:

    I calculated the total of each individual fruits and then substract it to "fruits eaten"

     

    Conditions:

    If the Calculation is equal to zero(0), that is.. "fruits eaten" - "each fruit" = 0   then I show the Submit button

     

     

    Thanks!

  • Profile Image

    Answered by couragerenewal on June 09, 2014 at 07:49 PM

    Beautiful! Incredibly helpful response. I just replicated these calculations and conditions on my form and it works like a charm. Thank you.