Skip to main content

Set up a formula field in web form/ PDF editors

Y
Written by Yuliia Biletska
Updated over 2 months ago

Formulas allow you to make automatic calculations in a form. The result depends on the values entered by users in the Number, Currency, and/or Date fields.

Note: If your document doesn’t contain any Number, Currency, or Formula fields, you will be unable to set Formula elements.

Formulas in PDF editor

  1. Create a new Flow or open an existing Template.

  2. Choose the Formula field and insert it where required.

  3. Enter a formula using the symbols to perform the calculations:

— curly brackets refer to the form fields which should be used in the formula;

and brackets — mathematical operations which can be used in a formula.


4. Additionally, you may make the formula field conditional and use Advanced settings.

  • Line spacing: set the distance between lines of text.

  • Format — set how the formula will be displayed: currency, decimal point, thousands separator.

  • View mode: adjust the text field during the field filling.

To learn more about the conditional field setup, check this article.

To make ensure the formula field performs calculations correctly, click Show Preview.

Enter numbers into the fields indicated in the formula field. The result should be displayed in the corresponding field.

Formulas in web form editor

The formula element allows calculations based on the values entered in number, currency, or date fields. With the formula field, it is possible to create complex calculations using mathematical operators and functions.

Note: Only use number, currency, date, or formula fields for setting up the formula element.

Tip: If a form contains two or more formula fields, you can use another formula field as a variable for your formula.

Begin by clicking Add formula. In the Add formula modal window, you can create a formula for calculating numbers and dates or for combining several fields into a single one (concatenation):

  • In the Number category of the formula element, perform mathematical calculations on numeric values using symbols like +, -, *, /, brackets, and variables.

Example: you need to calculate the total reimbursement amount once a recipient provides the amount for each category (Accommodation, Meals, Transportation) separately.

You can adjust the number of decimal places displayed in a formula.

Note: Setting no decimals will round the result to the nearest whole number.

You can select the symbol to display alongside the formula result, such as a currency, percent, or date symbol, or leave it as the default.

The results will be automatically calculated once recipients complete the fields used in a formula.

  • The Date and time category allows you to perform calculations related to dates and times. You can manipulate dates and times, calculate durations, and perform other date and time-related operations within forms.

Example: you need to calculate the number of days that your employee requests for their time off by specifying the start date and the end date of the period requested.

Select the unit to display the calculated result, such as minutes, hours, days, months, or years.


You can choose the symbol to display alongside the formula result, such as a period, time, default symbol, or none.

The results will be automatically calculated once recipients complete the fields used in a formula.

  • The Concatenation category combines data from various form fields into one, simplifying data management. This allows for a more convenient way of exporting or pre-filling custom values as they are stored in a single place.

Example: when placing an order, your customers must fill in their name, phone number, email, and delivery address in separate fields. You may need to keep the entered data in one line in a specific order to populate it when preparing an invoice easily.

Select the available fields you want to combine the data from. Add fields in order for the merged data to appear in the formula field. You can select as many fields as you need.

Once recipients complete fields used in a formula, the entered data from each field will automatically appear combined in the formula field in the order you’ve specified.

To modify your formula, access it from the sidebar and select Edit.

Did this answer your question?