Calculate the SUM Base on the User Inputs into the Form

  • Profile Image
    Asked on June 03, 2013 at 06:16 PM

    First let me say that I love the flexibility of JotForm and we are planning on incorporating JotForm web forms in several existing and several new aspects of our business.  But I do have a dilemma that I cannot seem to figure out.  I use JotForm for my employees to submit their weekly expense reimbursement requests through an expense reimbursement form.  The only functionality that I couldn't seem to incorporate is totaling the amount requested.  I thought the new Purchase Order option would solve that issue, but there seems to be a limitation in each option that will not allow it to total.  It's basically an exchange of money in reverse.  Instead of requesting our users to pay us, we're asking them how much we should pay them.  Is there a way to accomplish this that I haven't been able to figure out?  Or is this something you can look at adding?   Thank You!

  • Profile Image
    Answered on June 03, 2013 at 07:16 PM


    Unfortunately, we still do not have a function to calculate fields into the form. We provide a workaround such as using the form source codes and adding custom calculation scripts to the form source codes. 

    Well try to accomplish this to your form, we'll get back to you later today.



  • Profile Image
    Answered on June 04, 2013 at 04:01 AM

    Hi Joey,

    I have something for you. I have cloned your form here, I take it's source code and injected a script that calculates all the amount values. Here's a demo:

    Let us know if you want this solution so we can guide you through all this.


  • Profile Image
    Answered on June 04, 2013 at 07:33 AM

    I'm impressed with your response time and solution! I went to the demo and it seems to work perfectly. Let me know what steps I need to take to update my form with this script.
    Thank you!
    Joey Parker

  • Profile Image
    Answered on June 04, 2013 at 08:01 AM


    I just copied my colleague's code and you can download it from here:

    You can use this source code to embed your form in your website.



  • Profile Image
    Robert Murray
    Answered on December 08, 2015 at 03:57 PM

    This is excellent. Is there a way to clone this form? 


  • Profile Image
    Answered on December 08, 2015 at 05:41 PM

    You may clone the original form to your account using the form URL below :


    However, since the form's source code is modified to calculate the total, the calculations cannot work on the cloned form. Otherwise, you may use the source code provided and modify as per your requirement.

    Alternatively, you may use our spreadsheet widget on your JotForm without having to modify any source code now.

    This might help you in creating your own form as per your requirement. 

    Let us know here if you need any further assistance. We will be happy to help.

  • Profile Image
    Answered on December 08, 2015 at 09:31 PM


    If you were to clone the form at and embed its source into a web page, this script added to the bottom of the page would perform the required calculation without any need to change the form's code. That's what I did in this page.

    However, as my colleague has stated, our spreadsheet widget may suffice, depending on your requirements.

    Now, if you need further help with any of this please open a new thread, as we prefer to deal with each user in their own thread.