In case you’re not aware, you can pass a calculated value to a payment field’s total box. It’s discussed in the “How to Pass a Calculation to a Payment Field” guide. However, what if you want to pass the calculated value from one form to another form that has a payment integration? In this tutorial, you’ll learn how to pass a calculated value to the second form, particularly on the PayPal payment gateway for donations or custom payments. Basically, this is a basic prepopulating method using URL parameters, which is similar to the “How to Automatically Pass Form Data to Another Form” guide.
To start, you must have 2 different forms. Form 1 does the calculation and Form 2 is where the payment field will be populated.
NOTE: You can only pass a calculated value to a payment field if its Payment Type is set to either Collect Donations or User Defined Amount.

Example:
- Form 1 (Calculation) – https://www.jotform.com/213473520367959
- Form 2 (PayPal form) – https://www.jotform.com/213473516582054
To pass the calculated value to the PayPal field on the second form, follow these steps.
Build the Thank You Page URL
Create the “Thank You” page URL using the second form’s URL since Form 2 will serve as the thank you page of Form 1.
So, whenever the user submits the first form, they will be redirected to the second form with the payment field prepopulated.
We’ll use the following constructed Thank You Page URL as an example:
https://www.jotform.com/213473516582054?myProducts[price]={calculation}
To break that down:
- https://www.jotform.com/213473516582054 – the URL of Form 2.
- ? – the question mark is used as a separator.
- myProducts[price]={calculation} – the query parameter in key–value pair.
- myProducts[price] – the tag or unique name of the PayPal payment element on Form 2 as the key.
- {calculation} – the variable tag of the calculation field in Form 1 as the value.
Here’s how to get the tags or unique names of the fields to create a key-value pair.
Form 2: Payment Element’s Unique Name
- Edit Form 2 and click the Payment element’s gear icon.
- Go to the Advanced tab.
- Expand the Field Details section.
- Copy the Unique Name field’s value.

- Append
[price]
to it. In this case, the result ismyProducts[price]
.
Form 1: Form Calculation Widget’s Unique Name
Edit Form 1 in the Form Builder and get the unique field name of the field where the calculated value will come from.
- Click your Form Calculation widget’s gear icon to open its Properties panel.
- Go to the Advanced tab.
- Expand the Field Details section.
- Copy the Unique Name field’s value.

- Enclose it with curly brackets to use it as a variable. In this case, the result is {calculation}.
Form 1: Thank You Page
Set the constructed URL as Form 1‘s custom “Thank You” Page URL.

- Go to the Form Builder’s Settings tab.
- Then Thank You Page on the left.
- Choose the Redirect to an external link after submission option.
- Paste the completed URL with parameters to fill out the second form (
https://www.jotform.com/213473520367959?myProducts[price]={calculation}
)
Your changes will automatically be saved and you’re done. Go test your form!
Demo (submit this form to see how it works): https://www.jotform.com/213473520367959
Send Comment:
Comment: