Whether you have a simple or complex calculation using the Form Calculation Widget, you can now pass the calculated total to your payment field.
What will you need to make this happen? Two important things:
- Form Calculation Widget – you have to add the form calculation widget and set it up in your form.
- Payment Element – you also need to have one of our payment integrations in your form.
Setting up the Form Calculation Widget
If you have multiple calculation widgets in your form and wish to get their total, we highly recommend adding one more calculation widget and summing all other calculation widgets there. You can hide this new calculation widget if you don’t want it displayed in your form. This trick is needed since you can only pass one calculation widget to the payment field.
It would look like this:
Related User Guides:
Passing the Form Calculation to the Payment Field
Now, assuming you already performed the calculation in a Form Calculation widget, which represents the total to be paid by your users, just add and set up your payment field to fetch the value from the calculation.
- If you haven’t added the payment field yet, do the following:
- Click the Add Form Element button in the Form Builder.
- Go to the Payments tab.
- Please search for your preferred payment gateway, and click it. You can also drag/drop it to add. Here’s an example of the Stripe gateway:
- The Payment Settings would generally open once you add the payment gateway. Otherwise, click the Wand icon in the payment gateway to open it.
- Connect your account to your chosen payment gateway or provide your credentials when asked.
- Next, set up the following:
- Payment Type – you must select the User Defined Amount option from the list.
- Payment Box Sub Label – you have to enter a short description of what the payment is for.
- Get Price From – this is where you must select the Form Calculation widget.
- Lastly, please don’t forget to click the Save button to save your changes.
If you currently set up your form to Sell Products or Subscriptions, switching the Payment Type to User Defined Amount from the Payment Settings will permanently remove your product or subscription items. So please be wary of that. Here’s the prompt you’ll get when you switch from Sell Products/Subscriptions to User Defined Amount:
Here are demo forms you can check:
- https://www.jotform.com/221743458687468 (Simple)
- https://www.jotform.com/221744308526455 (Complex)
Send Comment:
2 Comments:
More than a year ago
I display a form field $amount in a paragraph, but if I hide that paragraph and then re-display it, the $amount is blank, even though the "amount" field is unchanged.
More than a year ago
Hi! I'm trying to sell products as a fundraiser and would like to add an additional donation amount. When I added Paypal it doesn't let me convert to user defined amounts without telling me it will delete my products. Ugh, please help!
I'm also trying to make it work so that ppl can pay online OR cash in person, but this too is a nightmare. I've tried all workarounds in the forums and they don't work