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.
Help with Form CalculationAsked by qliomaha on February 25, 2016 at 01:21 PM
Hi, we have a form to collect registration and payment for a charitable event. We would like to be able to send our attendees a charitable receipt immediately following their ticket purchase, so we are trying to figure out a way to code a calculation that produces the deductible amount of their purchase.
It is a fairly straight calculation.
We would like to add a field that computes the amount of their purchase that is not deductible, specifically for our attendees who do not purchase sponsorships. We will personalize those thank you letters. Therefore, the calculation is (Quantity of Fair Fun Packs - 8 tickets)*(400) + (Quantity of Tickets Age 21-34)*(50) + (Quantity of Tickets Age 35 and over)*(50).
We will then have a second calculation for the deductible amount of their purchase, which is simply (Total Payment) - (Non Deductible Amount)
We have added a Form Calculation widget to our form, but we are struggling to find a way to focus on the "Quantity" selected for the various ticket options. We assume this is possible, however, given we have the option to send a specific email to those who use our form based on conditional formatting on the quantity of those values.
Please advise us regarding the easiest way to do this. Thanks!
With conditions you could check out and see if some product was selected or not, but it would not be possible to check with conditions how much of - the quantity - was selected through the same.
As such it is also not possible to capture the same value in the form calculation. There are only 2 options that would allow you to do this.
1st - within the form builder
You could use form fields to allow everyone to purchase what they want allowing you to go into depth with form calculations and do them quite easily as well in the same time.
Then when you have the total that you want to pass to the payment tool, you just do that and that is it.
This is the guide that explains this: How to pass a calculation to a payment field
2nd - out of the form builder
The needed guide: How to get the Full Source Code of your Form
Both would do the job, but I do recommend the first option over the second since in the future it would be much easier to do any changes.