Skip to main content

[SOLVED] Calculation for payments

Hi guys!
I'm trying to create a form where I have two radio button fields with a numeric/calculation value (price).

I managed to have it all set up and have my prices in the different options of the radio button.

However, I'm trying to make the sum of the two radio button fields and have that sum be the amount people have to pay when submitting the form.

I tried with the Radio button fields and added a calculation field but I can't link this calculation field to the payment at the end, and I also tried with the radio fields in the payment item fields, but I can't get it to work and have the sum reflect in the amount that people have to pay.

I'm pretty sure I'm missing something, just can't figure out what haha
Do you guys have any ideas on how to achieve this please?

Thanks in advance for your time and advices! Take care β˜€οΈ

+following!

To set up a form in Fluent Forms where the payment amount is the sum of two radio button fields, you need to use a Custom Payment Amount field along with a Numeric Calculation. The key is to link the calculation field to the custom payment amount.

Here is a step-by-step solution:

  • Step 1: Create Your Radio Button Fields

    • Add two separate Radio Field input fields to your form.
    • For each radio button option, set a unique label and a numeric value for the price (mark the calc value options will show up).
  • Step 2: Add a Custom Payment Amount Field

    • From the "Payment Fields" section, add a Custom Payment Amount field.
    • Go to the "Advanced Options" for this field and enable the "Calculation" feature.
    • In the calculation box, add the smart shortcodes for your two radio button fields, separated by a plus sign (+), to create the sum. For example, {radio_field_1} + {radio_field_2}.
  • Step 4: Add the Payment Method Field

    • Finally, add a Payment Method field from the "Payment Fields" section to allow users to pay via the configured payment gateways (like Stripe or PayPal).

This setup ensures that the total value from the two radio buttons is calculated dynamically and then passed to the payment field, allowing the user to pay the correct, total amount upon form submission.

You missed this, I think.

Btw if you use Payment item field, it has radio field to choose for. Just using Payment Summary your work is done.

Jimmy Tavares

Nishat ShahriyarΒ This worked like a charm! You're a Legend! Thank you so much! β˜€οΈ

Nishat ShahriyarΒ I was wondering if this would work with the future integration with FluentCart :)

Nishat Shahriyar

Jorge de los ReyesΒ let's see!