Skip to main content
All CollectionsForms and data basesForm logic & calculationsCalculate price
How to calculate the additional price in your order form
How to calculate the additional price in your order form

Calculate product prices, and extra costs like packaging or gift wrapping, and display the total amount before users proceed to payment.

Updated over 2 weeks ago

In this tutorial, we will guide you through calculating both the product price and additional costs (such as packaging and gift wrapping), and displaying the total price at the end of your order form.

💡 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.

Here’s how you can set this up in your form:

Let’s consider an example online order form:

  • You can add product fields for users to select the items they are purchasing. This will automatically add the price of the selected items to the payment gateway.

  • For additional pricing, you can use choice fields to add extra costs like packaging or gift wrapping. These are "additional costs" beyond the base price of the products.

For example, you could add a single-choice field with options such as:

  • Standard Packaging €5

  • Premium Gift Wrapping €15

Other field types, like multi-choice or dropdown, can also be used for additional pricing options.

additional price

Add logic for calculating the total price

Now let’s set up logic to add the extra costs to the product price based on user selections.

  • Go to the Logic tab and from the right menu, select Advanced Logic.

  • In our example, after the user selects a packaging option, you can add a condition like:

    • If the answer is option 1 (Standard Packaging), then add €5 to the price.

    • If the answer is option 2 (Premium Gift Wrapping), then add €15 to the price.

logic and calculation

This will calculate the total price by adding the selected additional costs to the product price.

📝 Additional insights:

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

  2. 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.

  3. 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.

Use answer piping to show the total price at the end of your form

If you want to show the total price(product field price + additional price) at the end of your form or in the success message, follow these steps:

Add a content field to pipe the calculation of "total price"

To display the total price at the end of your form or in your success pages, you should use the variable ID for answer piping like this:

{{price}} OR @price

Now, the submitters can see the total calculation of their order at the end of the process.

🧩 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.

Did this answer your question?