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.
Calculate the SUM Base on the User Inputs into the FormAsked by firstname.lastname@example.org 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. 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!
expense JotForm purchase totaling reimbursement
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.
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: https://shots.jotform.com/elton/jotform_calculate_225033.html
Let us know if you want this solution so we can guide you through all this.
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.
I just copied my colleague's code and you can download it from here: http://pastie.org/8004544
You can use this source code to embed your form in your website.
This is excellent. Is there a way to clone this form?
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.
If you were to clone the form at http://www.jotformpro.com/form/31541104652948 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.