-
Sandy563Asked on May 25, 2018 at 11:24 AM
I am trying to add a calculation to a form. I want to calculate the "Number of Masses" by 5 and have the result appear in the "Donation" field. I am using PayPal. Does that make a difference?
Page URL: https://form.jotform.com/80934151831151 -
BJoannaReplied on May 25, 2018 at 12:12 PM
Inside of this guide, you can find how to perform a calculation inside of a form:
How to Perform Form Calculation Using a Widget
To pass calculation to the payment field, please check this guide:
How to Pass a Calculation to a Payment Field
I set the calculation in my cloned form. Here is my form - https://form.jotform.com/81445075870965
Feel free to test it and clone it.
Hope this meet what you are looking for.
-
Sandy563Replied on May 25, 2018 at 1:14 PM
Thank you for helping me!!
I did clone your form and noticed that the calculation does not take place. The number that is typed into Number of Masses "total" is duplicated in the Donation space, but it is not multiplied by 5 as needed.
-
BJoannaReplied on May 25, 2018 at 1:32 PM
I set the calculation to multiply the number entered in "Number of Masses" by 5 and to show the result in "Number of Masses 'total'". The calculated 'total' will be passed to the payment field.
You can hide the calculation field or set it to be Read-only, to prevent the users to change the calculated value. I updated my form and the "Number of Masses 'total'" field is now Read-only.
-
Sandy563Replied on May 30, 2018 at 3:12 PM
One more question....If the user inputs 1-9 in the Gregorian Mass box instead, can I have that calculation appear in the "Donation" box?
I'm giving the user the option of requesting Regular Masses OR Gregorian Masses.
-
Nik_CReplied on May 30, 2018 at 5:04 PM
Should that be Regular + Gregorian or one or another? For total I mean.
If it is both, you could insert one more form calculation widget and sum both, Regular and Gregorian:
And then pass that new field to payment:
If you want to give them a way to pick only one, then you could insert a radio button:
Which will conditionally show one or another:
And that will calculate only one of those.
Please let us know if that could work for you.
Thank you!