In the order form, add calculations based on the parameters entered in form fields by site visitors. Use 'Calculations field' in any vertical form. Parameters for calculations can be set in the Quantity field, dropbox, checkbox or a one-line input field.
How it works
— Add a vertical form from the category Form and button (you can use blocks BF204N, BF310N, BF311N, BF402N, BF403N, BF502N); — Create input fields; — For every field set a unique variable name; — Write an expression using mathematical operators such as +, -, *, /, () — Result will appear automatically when visitor inputs values.
A simple calculator for finding out the cost of a tabletop based on length and width.
Set the size of the tabletop to find out the final price
Example: How to create the form
Add the block Vertical form with multiple inputs. Blocks library → Form and button → BF204N.
Open edit mode — push the Content button in the upper left corner. Change title and description in the Block header tab.
Create the field for tabletop length: — Add new field by entering 'One line input field' in the Type box. — Set a variable name. We chose length for this example.
Add the width field in a similar way.
Create field for length
Create field for width
Create calculator for the tabletop: — Add Calculations field; — Change title, subtitle and variable name; — Enter expression for finding the tabletop price.
In this example we used the expression length*width*160, where 160 is the price per square meter.
Use only simple mathematical operators such as: + - * / ()
Write expression to calculate price
Add text before and after result
Example of a more complicated calculator
Checkbox and dropbox calculator.
There are 5 parameters that will determine the final price: Material — type of wood Length — tabletop length Width — tabletop width Cover — tabletop coating Legs — type of legs for the table
To find out the final price, set the following values: type of wood, size, coating and type of legs.