• Resolved Araca

    (@araca)


    I am creating a payment form with Stripe. I want to collect 3 different prices depending on which radio button is checked. I have created conditions so if price option 1 is chosen, the first Stripe field will be shown, with price 1. If price option 2 is chosen, the second Stripe field with price 2, etc.

    I must be doing something wrong, because only the first option works. So if radio button 1 is clicked, then the Stripe form is shown with the price for option 1. But if the other radio buttons are clicked, no credit card field is shown at all. It doesn’t matter if I reload the page and click price option 2 or 3 first, no credit card field shows up for them.

    Am I doing something wrong or is collecting different price levels not possible?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hello @araca

    I hope you’re well today!

    There can be no multiple Stripe fields used within a single form. Forminator’s form builder wouldn’t even let you add more than one Stripe fields to the form via “Insert fields” buttons. It does, so far, let you duplicate Stripe field but that’s a bug our developers are already aware of and it should be fixed soon.

    In order to achieve what you described you actually only need one radio field, one calculations field and one stripe field and here’s how to do this (for clarity, I’ll assume we’re starting with a blank form and I’ll stick to default field names):

    1) add a radio field to the form (“radio-1”) and edit it, creating three options with proper descriptions so users would know what they are selecting

    2) in that radio field configuration go to “Calculations” tab and enable calculations
    – you’ll be given an option to assign numeric value to all three options so those should be your prices

    3) add another field of type “calculations” to the form (“calculation-1”) and edit it; I suggest setting it to read-only; you can give it a label such as e.g. “Your price” or “Total price” or just hide it.

    4) in this field configuration in “Calculations” tab pick only {radio-1} in calculation formula area and save the field

    5) add stripe field to the form, configure it the way you need and then in its “Settings” section for “Payment amount” select “Variable” and select your “calculation-1” field as amount source

    Once you save the form this will happen:

    – visitor will select option using radio button
    – based on this Forminator will “calculate” the price using the “calculations” field (depending on settings of your choice it will show it to the visitor or not)
    – that price will be carried over automatically to the Stripe field

    Best regards,
    Adam

    Thread Starter Araca

    (@araca)

    Wow, it worked!! I’m so grateful, Forminator is awesome!
    Thank you so much for the detailed instruction, this is really very useful for my site!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Payment form with 3 price options?’ is closed to new replies.