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

    Looking to have calculation based on total

    Asked by skippboyenga on February 02, 2015 at 01:20 PM

    I've looked through the forums but can't seem to find a perfect clone of what I'm trying to accomplish.. I'm building a form that has several products at varying prices.. the totals are simply written in the text area, but it's coded so the total will appear based on quantity. I have the fields talking correctly to the 'total' field (working), but if you fill out more than one of the products, the total field doesn't compile the TOTAL cost - just the last quantity you fill. Is there an easy way to compile the full total based on quantity?  Sample form below:

    http://form.jotform.us/form/50324907341146

     

    Thank you

    Skipp

    Page URL:
    http://form.jotform.us/form/50324907341146

    JotForm quantity prices sample form
  • Profile Image
    JotForm Support

    Answered by david on February 02, 2015 at 02:19 PM

    Hi,

    You would need to use a form calculation widget, rather than just updating a field value.  Here is how I setup the widget to work with your form after I added it:

    This will take the quantities entered in your fields, then multiply those quantities by the cost per item.  It will then take those two values and add them to together.  Here is my test form to show you it working:

    http://form.jotformpro.com/form/50325143210942

    Let us know if you have any further questions and we will be happy to help.

  • Profile Image

    Answered by skippboyenga on February 02, 2015 at 03:22 PM

    Thank you for your reply, this helps a bunch. To add more fields then, do I simply add a text box, then the calculations in the total field to tie in the new field? I did try this, and it works (link below), but I'm not able to add the same conditions to that field (your example has the ability to add a 'if book 1 is greater than 0' - I don't get the same option of 'greater than' in my example. I've imported your form from the link above and tweaked it to add a 3rd - can you tell me what I'm missing?

    Your form also seems to calculate MUCH faster than mine.. not sure if that's just on my end.. it goes faster once you fill a few out, but seems like it takes a minute to catch up or something..

    your form: http://form.jotformpro.com/form/50325143210942

    my form: http://form.jotform.us/form/50325518240143

     

  • Profile Image
    JotForm Support

    Answered by david on February 02, 2015 at 03:35 PM

    Hi,

    The field I am using is a calculation widget rather than a normal field.  If you see the first screenshot I posted, it shows the widget I am using in my example.  I have the settings set to only do the final calculation after all of the fields in the calculation are entered.  It will not update the final calculation without all 3 fields entered.

    To add additional fields, you are correct.  Add text boxes to your form, then add those fields in with your calculation.  Your current form looks to be set up correctly.  The calculations also load very fast. 

    Are you still having issues getting this working properly?  As far as I can tell you have it set up and working without issue.

  • Profile Image

    Answered by skippboyenga on February 02, 2015 at 03:49 PM

    Ok, thanks. I thought it might be on my end that it was running slowly. The only thing I think is mystery is that on the first 2 inputs you have the option to add the 'if/then' statement with the 'greater than 0' - my 3rd line (the one about 'beginning woodcarving'), when I try to add the same conditional statement, the 'greater than 0' portion is not available. Many other options are, but greater than is not one of them. Maybe I don't need to worry about it, just seems strange I can't add the same statement in the wizard.

    1st 2 fields:

    New field:

     

     

  • Profile Image

    Answered by Shadae on February 02, 2015 at 05:06 PM

    Hi skippboyenga,

    On behalf of my colleague, you are most welcome.

    To get that option on a selected field, you would need to use a number field from our Quick Tools.

    I hope this helps, please inform us if you need further assistance.

  • Profile Image

    Answered by thrivewellness on February 03, 2015 at 09:59 AM

    Perfect! Thank you!

  • Profile Image

    Answered by thrivewellness on February 03, 2015 at 10:01 AM

    That did it! Thanks!

  • Profile Image
    JotForm Support

    Answered by david on February 03, 2015 at 11:21 AM

    Glad to hear it!  Let us know if there is anything else we can help you with and we will be happy to do so.

  • Profile Image

    Answered by skippboyenga on February 03, 2015 at 05:32 PM

    Sorry David - I would love to have you look at this one more time to see what I'm doing wrong with the FULL, completed form.

    http://form.jotform.us/form/50336481080146

    The same problem is happening as it were in the beginning - it's spitting out the correct totals of ONE of the items, but won't 'grand total' them all together if multiple fields are entered. Can you peek at how I set this up and see what I missed?

    Thanks again -

    -s

  • Profile Image
    JotForm Support

    Answered by david on February 03, 2015 at 06:25 PM

    Hi,

    I checked your form and you have several conditions overriding your equation:

    You have a calculation being performed, then a value inserted afterwards in its place.

    After deleting all of your conditions, the form worked as expected:

    http://form.jotformpro.com/form/50337111293951

    Let us know if you have any further questions and we will be happy to help.

  • Profile Image

    Answered by ellenwoodarts on February 03, 2015 at 09:51 PM

    That is awesome. Not sure I completely get it, but amazing that you could help. Thanks so much David!

  • Profile Image
    JotForm Support

    Answered by EltonCris on February 04, 2015 at 02:00 AM

    On behalf of my colleagues, you're welcome.

    Cheers! :)