Skip to main content
How to calculate the price in the form

Calculate product prices, add shipping fees, and display the total amount before users pay. Easy setup, secure transactions.

Updated over 3 weeks ago

By following these simple steps, you’ll be able to create a customized order form that suits your specific needs in no time!

💡 Pro Tip: If your form is connected to an online payment method like Stripe or PayPal, make sure to use the default price variable for price calculations.

This variable is automatically available and usable in logic when you have a product field or have enabled payment settings with a selected payment method.

For forms without online payment integration, feel free to use custom variable fields for your price calculations.

1. Create a form and customize it

Sign in to your Formaloo account, go to the dashboard, click on + New Formaloo, and choose form. Edit it from "edit base" to start building your form, or use one of our 200+ Templates.

🧩 Template:

For a ready-made solution, you can use this Online order form template to easily calculate additional prices based on user selections. Customize it for your needs to calculate total prices, including packaging and gift wrapping, and display the final price to submitters.

2. Add product fields

You can add products to your online order forms or any form for selling items using the product field, which is a useful tool.

⭐ Pro tip:

By adding product fields, the price variable will be added to your logic page and you can add additional prices to this variable via the advanced logic.

3. Additional pricing options

Here you can add extra amounts to your order - for example, if you need to include additional costs such as packaging or shipping fees. So you can add a single choice field, and add your options.

additional price

Then with the logic you can add these prices to the product price your client has already chosen.

📝 Additional Insights:
Learn more about how to calculate the price in the form using product fields and additional options like packaging or shipping fees in the article How to calculate the additional price in your order form.

4. Connect your payment gateway to your online order form

After you make your form, It’s time to connect it to your payment gateways to redirect customers to them. So by linking the form to a payment gateway, customers can make purchases quickly and securely.

payment method

From the settings tab, you can enable the Form with payment option and select your payment method to connect your payment method to your online form.

⭐ Pro tip:

If you don't have any product fields and want to use single-choice fields for your products and calculate the price, the price variable will be automatically added to your logic page by enabling the "Form with payment" option.

5. Add logic for calculating the additional price

Now it’s time to calculate the total price using the logic, where you can also connect and add additional prices to the product fields’ prices.

logic and calculation

Once you choose a field, the logic tab will appear on the right sidebar, click on it and select advanced logic.

📝 Additional insights:

  1. How to add a currency to the product field: Learn how to add a currency to the product field in your form settings and enable payment features.

  2. How to create a new payment method: Connect your payment gateways to Formaloo by creating a payment method in profile settings and enabling payments in your form settings.

6. Pipe the total price and show it to the user

It is a good idea to show the total price to the users at the end of your form, so the customers can see the calculation of their order before redirecting to the payment gateway.

📝 Additional insights: Learn more about how to use answer piping on your forms.

To pipe the total price on your form, You should add a content field and write inside the description part like this:

Total price: {{price}} or @price

Answer pipe the variable
Did this answer your question?