JotForm User Guide / Payment Forms /

How to Pass a Calculation to a Payment Field

How to Pass a Calculation to a Payment Field

Whether you have a simple or complex calculation using the Form Calculation Widget on your form, you can now pass the calculated total to your payment field.

Video Tutorial


What will you need to make this happen? Two important things:

1. You should have a FORM CALCULATION WIDGET added to your form. Use this widget to perform calculation, e.g. calculate total from different fields.

2. And a PAYMENT TOOL to your form and should be set to USER DEFINED AMOUNT.

Assuming you already performed the calculation in a Form Calculation Widget, which represents the total to be paid by your users, follow these steps:

1. Click the WAND icon on your payment field.

2. On the PAYMENT TYPE section, select USER DEFINED AMOUNT.

3. If your payment field has existing PRODUCTS in it, a message will popup asking if you wanted to continue changing the PAYMENT TYPE. It's because this action will remove all your PRODUCTS. If you ever change your mind later on, you can switch the PAYMENT TYPE back to SELL PRODUCTS and your previously added products should still be there.

Moving on, select YES, GO AHEAD.

4. Select your Form Calculation field on the GET PRICE FROM section.

5. Make sure to click the SAVE button at the bottom.

That's it! Your total calculation will now be passed to your payment field.

Here is a demo form showing how this works:

Here's another example with a more complex calculation:

Have you tried it yet? Please share your experience in the comment box below.

Contact Support:
Our customer support team is available 24/7 and our average response time is between one to two hours.
Our team can be contacted via:
Contact JotForm Support:

Send Comment


  • Romero_Shaun

    i am pulling the in from another form here

    And when i open the new form, it keeps blowing out the invoice amount (in this case it is 55.25). Is there a reason why this keeps happening?

  • mccurdy444

    is there a way to do if/then conditions?

  • yohann.aube

    Is is possible to pass a calculation to a payment field when using the cards layout ?

    I don't manage to make it work...

  • Magills

    I cannot get this to work. I am using square and cannot get the total amount to pass down into the total field in square thus the customer has to type it in. I obviously don't want that.

  • proxi3000

    I'm getting a huge description text box, not the price

  • zerpa11

    Buenas amigos de JOTFORM, Bueno, mi pregunta es la siguiente: Yo tengo una Agencia de Apuestas Online.

    ¡Quisiera Saber como podría crear un campo de SALDO en mi Formulario de Apuesta! Osea que la Apuesta para QUE SEA "APROBADA" por mi Sistema, el Cliente o Usuario Registrado debate tener Saldo Positivo.

    ¡Espero su pronta respuesta, Gracias!

  • pfreitasfunchal

    Sorry my friend...can you pls make me a sdmall video on how to get this done? I am so sorry but i am always having errors it does not work.

    if you coud share a video on my actuall form, that wil be MUCH APRECIATED.

    I have tried sorry

    Thanks in advance


  • Doguk

    How do I create a user defined amount using the GoCardless element?

  • MzSadie

    I'm not seeing how to integrate a conditional quantity field into the Square payment form. Help?
    Tnx so much!


  • gsesc376

    Can you add a calculation into a payment field, if a minimum amount has to be paid? For example the calculation might show $3.50 but the minimum due is $5.00?

  • Mark Lacroix

    OK all that works. However, I was unable to test whether the PayPal part works?

  • GuildMusic

    I have done all the above yet when hitting submit in the preview of the form I'm taken to the Thank you page and not PayPal. I have selected User Defined Amount and get price from etc. The Total Price goes to the PayPal Payment Tool field in preview, everything is working just the fact it now does not go to PayPal for the user. Is there a step missing in the above to make this happen that is missing? I've searched in the below comment responses but don't seem to be able to find a similar issue to fix this issue.

  • tturiano

    Unfortunately, coupons that I had set up were deleted when I used this process :-(

  • Souhear

    Ok, but I need to make the button of (submit) in the registration form pass into the payment field, could I?

  • Souhear

    I dont have the (get price from) window!!

  • ayadov77

    can this be done with Stripe? pass the final total from the calculation field to the Stripe? Thank you

  • rockblinka

    Hi, now I have my form with the integration but there is any button to submit the payment , do I have to setup in the "thank you page"? I want my clients can clic in submit and go directly to do the payment for the services. Thank you (again) ;)

  • rockblinka

    Hi guys, I have a problem, when I use the preview of the form I don't get any price or option to pay with Paypal, is this normal?

  • dogtaggs

    I have used form calculation widget to calculate the sum of ticket sales. I have followed the instructions above to pass the calculated total to the payment field; however after selecting 'user defined amount' in the payment type i do not get the the pop up message as in '3' above and the only options available to me in then'Get price from' field are 'None (manual)' or 'clickto37'. Can you advise why I cannot see the 'calculation widget' option? Thank you

  • Michelle

    So far the only way I have found to get a Total price on item wanted for customers is through paypal but I do not want to take paypal payment.

    Is there another way to do it?

  • PWSA

    So you press yes in step 3?
    Then how do you get your products back?

  • susane

    I want to set up a catering form that will creat an automatic 20% tip charge to the order.From what i see i can creat in jot form but it is just lumped together with the sale price when send to square so the sale price and tip arent seperate identites in my square records.Do you have a fix and if not can i connect you with square to find one?

  • rhenry

    I am having the problem of only seeing None(Manual) as an option. I only have one other field on the page, a number field that pre-populates from a registration form. I want the pre-populated field to eventually be hidden and automatically fill in the PayPal payment box so the payment amount can't be changed. Help is appreciated!!!

  • Ian Barnes

    Why would someone answer this with a link back to this forum question??????

    My question was answered back in 2014, as the following:

    "Answered by Mike_T on December 02, 2014 at 05:18 PM

    The donation option can be unchecked on the PayPal Integration Wizard.

    It should forward the amount as a regular payment in this case.

    If you need any further assistance, please let us know."

    However there is no Paypal Integration Wizard now, as it showed back then.

  • Ian Barnes

    My calculation box is named "Clickto" under "Get Price From", so I have chosen that one and it works.
    However...Under my payment widget/properties/advanced, it shows my Field ID as: #input_111_donation (and it can't be changed). I am afraid that Paypal will interpret this as Donations. Any thought??

  • brooklinefoodcoop

    I hope the actual code works better than the example shown above.It shows the Product 1 box, at $10, checked. However, the Total Price in the USD box is shown as 110. I used the link provided, and the demo had the same flaw. When I also checked the box for Product 2, the Total in USD became 325.

  • JuzeBacknang

    I just made it! ;-)

    You need to use a widget "Form Calculation" as the source field

  • JuzeBacknang

    I'm having the same issue that there is no entry in the "Get Price From" field - only "None (Manual)".

    How did you solve that?
    Maybe I'm just blind.. but I don't get that field there.

  • BackdropCity

    I am working on the form below:

    I am also trying to edit the 'Get Price From' field, but it only says 'None(Manual)'. I saw the above comment with the same issue but it has not resolved my problem. I have calculated values in the 'Backdrop Size' field and in the 'Additional Features' field.

  • breadsbybreadshop

    When I submit my form, Paypal says "Error Detected. Your shopping cart is empty."

  • maccalgary

    Never mind. It turned out that I was using a normal text field rather than a calculate field.


  • maccalgary

    I am working on this form:

    And when I try to edit the "Get Price From:" field, I only find the "(None) Manual" field and cannot find an option to choose a specific field.

  • Shortkat

    I tried to set up a payment form using CickBank as an option. I filled the form in the wizard (account name, item n°, product name, product price, and currency), I clicked next and I've been provided with a link that I put it on the Thank You URL of the product, but when clicking the "Finish" button nothing happens at all!

    Is there something I'm missing?


    I was able to calculate one product. Everyone also is required to pay for one other static product. I can't find a way to add this to the payment field.

  • Randy Esguerra

    Is it possible to set up the taxes to be applied to an item and charged in the total cost?

  • bevigilant

    This is what I received when testing my form...

    [PayPal Express Error]
    -An error has occurred. Please contact form administrator for assistance.
    [Transaction refused because of an invalid argument. See additional error messages for details.]
    -You are not signed up to accept payment for digitally delivered goods.

    What could be the problem?

  • KC

    Is it possible to add a coupon code to the total? In other words, the calculation will automatically calculate the total, but I want to give some people a coupon code which will then take a set $ amount off the total.

  • memen

    Do you have to pay in paypal?

  • socialur

    Useless. Paypal will limit your account if you accept business payments as Donations...


    This is wonderful - I need to be able to send a calculated value to the subscription field in the paypal payment wizard or to set the above field to collect in equal payments over time.

    We would like to offer an instalment plan. Any chance that this could be possible?


    PLease can you do this with Purchase Order too.