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

    Making form submittable only if the grand total matches the value of individual total amounts on the form

    Asked by samit96 on December 17, 2015 at 06:52 PM

    My form has inputs of various amounts and then a final slot for grand total amount. I wanted to make it so that the form would not submit unless those separate amounts equaled the grand total amount.

    Page URL:
    https://form.jotform.com/53347608701152

    grand total amount calculations calculate hide submit
  • Profile Image
    JotForm Support

    Answered by jonathan on December 18, 2015 at 12:02 AM

    I assume you meant there will be 2 sets of amounts that will be calculated and they will be totalled on 2 separate grand total also.

    I checked your jotform http://www.jotform.com/53347608701152 and I can see you have understanding already of the Condition Rules and Form Calculation.

    So maybe you can just Hide the Submit button if the 2 Grand Total are not the same. Do the necessary calcuations and get the 2 separate grand total. 

    The main point I believe is the grand total data -- they should be equal to be able to proceed.

    If all the calculation script are correct then you wil be able to get the correct grand total as well. You can then use both grand total data for comparison/validation.

    Please let us know how we can assist you further.

    Thanks.

     

  • Profile Image

    Answered by samit96 on December 18, 2015 at 11:16 AM

    Umm, maybe I can try to explain again, sorry.

     

    In the form their are inputs for "Camp Food" Purchase amount, and "Swimming" Purchase Amount, etc.

    I wanted to have it so that the form would not submit unless those various categories purchase amounts (Camp food, swimming, etc) equal the grand total input at the end of the form. Would that be possible?

  • Profile Image

    Answered by Ben on December 18, 2015 at 12:46 PM

    Looking at your form it seems that you are actually asking people to fill out the purchase value instead of showing them what is the amount that they should pay for.

    Because of that you want to make sure that the grand total is the same as all individual totals.

    Now my personal suggestion would be to approach this a bit differently. Instead of asking them to do the calculation and input the same, to making it automated instead.

    Now, I have clicked on the Swimming under Select Categories of Purchase and that had shown me 3 receipts.

    Are you going to charge them for all 3 of those (based on the calculations shown under it seems that this is the case) or do you want them to select what they would like to have and based on what they select, to charge them appropriately?

    If they get all 3 of receipts as soon as they select Swimming (and same applies to other options) then you can simply set the amount to be hard-coded - value. You do that by setting the value with the tax into the field as default amount.

    This means that they would be able to fill out the form faster and as such result in more conversion.

    If you want them to select different options under each receipt (sport, food, self expression, etc) then you can do that by showing a set of checkbox questions and each of them containing its own price. As they click on the ones they wish, their total is raised.

    If you still want to match the total fields with the grand total, do let us know and we would be happy to assist.

  • Profile Image

    Answered by samit96 on December 18, 2015 at 04:24 PM

    No... you are not understanding, sorry.

     

    The various category amount is for the user of my JotForm to enter varioous purchases they have made. The text provided in the JotForm is simply an example. 

    So users would insert various amounts they purchased in each category. And at the end, I am asking for the grand total. This grand total should be the sum of each of their amounts...

    Can that be done automatically or can it be conditioned in a way that it would not be accepted unless the grand total equals the sum of each of the category amounts...

     

    Hope it is clear now.

     

    Thank you.

  • Profile Image

    Answered by samit96 on December 18, 2015 at 04:54 PM

    No... you are not understanding, sorry.

     

    The various category amount is for the user of my JotForm to enter varioous purchases they have made. The text provided in the JotForm is simply an example. 

    So users would insert various amounts they purchased in each category. And at the end, I am asking for the grand total. This grand total should be the sum of each of their amounts...

    Can that be done automatically or can it be conditioned in a way that it would not be accepted unless the grand total equals the sum of each of the category amounts...

     

    Hope it is clear now.

     

    Thank you.

  • Profile Image

    Answered by Ben on December 18, 2015 at 06:07 PM

    OK, thank you for the additional details. I understand what you mean now.

    This can be accomplished by using 1 hidden Form Calculation and 1 conditions.

    First we add Form Calculation widget that we will use to sum all of the { total amount *} fields.

    Now we set condition that will disable the submit button if this form calculation value is not the same as what we have added into the grand total field.

    You can see this in action on this form: https://form.jotform.com/53517400519956

    Do check it out and if that is what you would like to accomplish on your form, then following the steps above will allow you to do that.

    Just remember to hide the form calculation so that they are not confused by both.

    I would also suggest showing an error of some kind above the submit button to tell them that the values entered are not correct - so that they know why it is disabled or hidden.

  • Profile Image

    Answered by samit96 on December 21, 2015 at 01:47 PM

    Having a hard time finding the calculation wizard

  • Profile Image

    Answered by victor on December 21, 2015 at 03:10 PM

    All the widget can be located in the left toolbar under the WIDGETS section. If you do not see that widget, you may enter the name in the search box. It will display all widgets that have similar names that are typed.

    Once you add the widget, the wizard will automatically appear. If the widget is already added. you just need to click on the widget and press the WAND icon to open the wizard.

    Please let us know if you require further assistance.

  • Profile Image

    Answered by samit96 on December 21, 2015 at 10:05 PM

    I have done what Ben had suggested. But for some reason the submit button is still not becoming enabled after the values equal one another.

    (The calculated amount like ben showed is hiden once the name field is filled)

  • Profile Image

    Answered by samit96 on December 21, 2015 at 10:12 PM
  • Profile Image

    Answered by samit96 on December 21, 2015 at 10:19 PM

    After playing with it for some time, I realized the condition does work sometimes..., however when it does, it is super delayed. The submission button does become enabled but after several seconds if not a minute. This delay also happens when I change the grand total amount after i had it right, so it doesnt register that the amounts do not match and I am still able to submit an amount that is not correct.

  • Profile Image
    JotForm Support

    Answered by BJoanna on December 22, 2015 at 01:19 AM

    I am also able to replicate mentioned issue. 

    I will get back to you as soon as I find a reason why is this happening.

  • Profile Image
    JotForm Support

    Answered by BJoanna on December 22, 2015 at 01:33 AM

    Can you please delete condition to enable/disable submit button and instead of that condition set condition to hide/show submit button if "Automatic Calculation" is not equal to "Grand Total".

    Here is my demo form: https://form.jotform.com/53550889640969 

    Feel free to clone it.

    Let us know if you need further assistance.

  • Profile Image
    JotForm Support

    Answered by BJoanna on December 22, 2015 at 02:43 AM

    I made some more tests and if conditions is set like this Disable submit button condition will work. 

    Here is my new demo form: https://form.jotform.com/53551087147962 

    Hope this will help. Let us know if you need further assistance.

  • Profile Image

    Answered by samit96 on December 22, 2015 at 02:24 PM

    Thank you

  • Profile Image

    Answered by Ben on December 22, 2015 at 03:29 PM

    In my colleague's name you are welcome.

    I am not sure why it did not work for you, but I am glad that it is now resolved :)

    Do let us know if you have any additional questions and we would be happy to assist with the same.

  • Profile Image

    Answered by samit96 on January 04, 2016 at 07:44 PM

    https://form.jotform.com/53555617926162

     

    That is the jotform. I hope you can read the thread above to understand what is going on.

     

    Bascially i was running trials and the submit button doesnt appear when i put for example "100.10" as one of the purchase amounts and then i put "100.10" as the total. This shoudla allow the submission but it doesnt. Submission only happens when i put "100.1" not sure why that is.

  • Profile Image
    JotForm Support

    Answered by jonathan on January 04, 2016 at 10:45 PM

    It is working when I test your jotform https://form.jotform.com/53555617926162

    This was the condition rule on the form

     

    the condition rules state that if Automatic Calculation = Grand Total Purchase... SHOW Submit button. 

    Can you please share also a screenshot to us when both fields were equal and it was not showing the submit button?

    Thanks.

  • Profile Image

    Answered by samit96 on January 28, 2016 at 11:40 PM

    Hi, I am still having the same situation as before. In order for the submit button to appear, the automatic calculation must equal the grand total. Since it is monetary values users often enter 50.50 instead of 50.5. 

    The form doesnt realize these two things are the same thing. Can it be fixed 

  • Profile Image
    JotForm Support

    Answered by jonathan on January 29, 2016 at 12:51 AM

    You can fix on your jotform https://form.jotform.com/53555617926162 to show 2 decimal digits by default. Redo the configuration wizard and make sure the option "Show empty decimal places" is checked/

     

    so it should work like this...

     

    Let us know if you are not able to fix it.

     

     

  • Profile Image

    Answered by samit96 on February 19, 2016 at 11:15 AM

    Thank you.