Variable fields are hidden fields that store calculated values based on user inputs. You can reference them throughout your form using formulas and answer piping.
A variable field is used to:
Store a calculated value using a custom formula
Remain hidden from the user but used for logic or dynamic output
Be referenced in other fields or sections of your form
You can use variable fields in:
Area calculators
Donation forms
Quizzes
BMI tests
Logic-driven workflows
Example: Circle area calculator
Let’s build a form that calculates the area of a circle using the formula:
A = π × r²
Step 1: Create a new form
Open your Formaloo dashboard
Click + New Formaloo and choose to create a form from scratch
Step 2: Add required fields
Add the following fields to your form:
Number field – For the radius input
Label: Radius
Set an ID (e.g., radius)
Variable field – To perform the calculation
Content field – To show the result to the user
Content: Use answer piping:
{{area}}
💡 The result will dynamically display the calculated area based on the input radius.
Displaying variable values with answer piping
To pass a variable field value to another part of the form:
Use answer piping by typing the variable ID inside double curly brackets (e.g., {{area}}) or @area
This works in content fields, email templates, and logic rules
More examples of variable fields
You can find other examples of variable fields in our tutorials.
A donation form with a variable amount uses the variable field to enter the payable amount of the donation.
👉 Try the Donation Form with Variable AmountThe online personality quiz compares the score of your variable fields with the logic and connects the related personality type to your responses.
👉 Explore the Personality Quiz templateThe BMI test with logic and calculation, is another form using variable fields to calculate the BMI value.
👉 Use the BMI Calculator template