I am trying to prepopulate a price in a Stripe field.
-
robinconnAsked on April 03, 2016 at 04:31 AM
I am trying to prepopulate a price in a Stripe field. The price I have stored in the form is $90.00. Here is the form.
http://form.jotform.us/form/60906513799163?
When I look at the HTML with the price selected, the line of code for the price I want to change is:
90.00
I want to use a value I have stored in a database to fill the "Price" on the form via a Querystring URL. I can't figure out the correct format.
This is a re-post of a comment on Prepopulating Fields to Your Jotform via URL Parameters
-
BorisAnswered on April 03, 2016 at 06:31 AM
It looks like you are using regular products in your Stripe payment field, for which prices were set up directly within the form, and the price of such products cannot be prepopulated or changed with URL parameters.
With URL parameters and prepopulation, we can only change the same values that a user can change as well. In other words, we can only possibly prepopulate the quantity of a certain product that is selected, or the amount in the "custom amount payment" field, as in the following demonstration form:
https://form.jotform.com/60635962856972?paypalDonation[price]=90
However, we cannot change the price of a product.
If you intend to provide your own custom price to the form from a database with URL parameters, you would need to use a different type of options in your payment tool - the "Custom Amount Payment / Donation" option:
https://www.jotform.com/help/49-Order-Form-Types
Alternatively, you can also perform your own price calculations directly within the form. This would be done by:
1. Using widgets such as Inventory widget to store your products if they are limited in numbers, or regular Drop Down/Radio Button/Check Box field if your products are unlimited in quantity.
2. Using form calculation fields to calculate the price:
https://www.jotform.com/help/259-How-to-perform-calculation-in-the-form
3. Finally, passing the calculated price to the Stripe payment tool for processing:
https://www.jotform.com/help/275-How-to-pass-a-calculation-to-a-payment-field
If you need further assistance, please let us know.