How can I have the total of a calculation appear in a different field?

  • Sandy563
    Asked 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?

  • BJoanna
    Replied 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. 

  • Sandy563
    Replied 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. 

  • BJoanna
    Replied 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.

    1527269134total Screenshot 10

    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.

  • Sandy563
    Replied 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_C
    Replied 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:

    1527713926Screen Shot 2018 05 30 at 10 Screenshot 10

    And then pass that new field to payment:

    1527713950Screen Shot 2018 05 30 at 10 Screenshot 21

    If you want to give them a way to pick only one, then you could insert a radio button:

    1527714058Screen Shot 2018 05 30 at 10 Screenshot 32

    Which will conditionally show one or another:

    1527714092Screen Shot 2018 05 30 at 11 Screenshot 43

    1527714150Screen Shot 2018 05 30 at 11 Screenshot 54

    And that will calculate only one of those.

    Please let us know if that could work for you.

    Thank you!