form with variables

How to create a form with variables

The power of variable fields, an essential feature to provide a powerful means of incorporating calculations and logic into data collection processes.

Form variables stand in for hidden calculated values, can be bound to columns, and can be used as references in other runtime expressions like calculated value controls and rules.

There are different types of forms and templates that you can use for the variable field, like a personality quiz, area calculator, donation form, BMI test and etc.

To pass a variable field value to another field in the form, you should use the answer piping feature.

Personality quiz

Use template →

Area calculator

Use template →

Donation form

Use template →

How to use variable field

To create a form with the variable field, open your dashboard and create a new form. Now, add a variable field from the editor page’s left menu.

Choose the type of variable as “Formula” and add an “ID” for your field.

variable field

In the “Default Value“, you can write the formula that you want to calculate and use in your form.

Let’s continue with the area calculator template that includes five formaloos. Each formaloo is designed to calculate the area of a particular shape. For example, the “circle area” form, calculates the circle area based on the formula and the radius “variable” entered by the user. 

It includes variables, logic, and calculation to give the right answer automatically, based on the users’ answers. 

Here we should add three fields:

  • A “Number” field to enter the radius of the circle with an ID as “radius
  • A “Variable” field to add and calculate the formula of circle area with an ID as “area
  • A “Section” filed to see the calculation value on the form or app
circle area calculation

Write the circle area formula as the default value: radius * radius * 3.14159265359

And add an ID as: area

Pipe your formula calculation to the section field

Now is the time to see the calculation of your formula in the section field. With answer piping, you can easily pipe the calculated amount of circle area in the section field. Just add the variable field’s ID inside the section field as: {{area}}


How to boost your customer engagement with answer piping

The ability to meaningfully engage with customers is essential for success in today’s fast-paced business environment. Answer piping is an approach that can transform your customer engagement strategies.

Learn more!

That’s it! You have the calculation of the circle area on your form.

More examples of variable fields

You can find other examples of variable fields in our tutorials;

  • A donation form with a variable amount is one that uses the variable field to enter the payable amount of the donation.
  • The online personality quiz compares the score of your variable fields with the logic and connects the related personality type to your responses.
  • The BMI test with logic and calculation, is another form using variable fields to calculate the BMI value.

You can start creating your from scratch or select from 200+ templates

Sign up for Formaloo for free. Start exploring the features it offers. These range from simple contact forms to complex and logical quizzes and surveys.

Follow us on our Youtube channel to get tutorials and live product demos.

If you have any questions, check out Formaloo’s support page to find ways you can contact us.

Les meilleurs outils no-code en 2023
Top 10 student assessment apps for teachers
Les 5 meilleures alternatives à Google Forms

Getting started is easy

Start organizing your data with Formaloo.