Everest Forms-Calculations #
This add-on helps you to perform calculations on the number/range fields within the form.
- Firstly, you need to purchase the Everest Forms Pro plugin.
- After the successful purchase, you will get the plugin zip file under your WPEverest account page.
- Now, you can download the everest forms pro plugin and Calculations add on from there.
- Through your WordPress Dashboard, visit Plugins -> Add New -> Upload and then choose the downloaded zip file and then install and activate it.
- Now you are ready to use this add-on for your site.
- Once you have entered the Everest Forms Pro license on your site, go to Everest Forms > Add-ons.
- Search for ‘Calculation‘ add-on.
- Click on ‘Install‘.
- Once the installation is finished, click on ‘Activate‘. The add-on will be activated.
Setup and Configuration #
Once, you have completed the above-mentioned task of installing and activating the plugin, you can perform the required calculations on your forms.
Enable Calculation: #
For enabling the calculations, please add a required number of range slider/number fields on your form. Here, you will have to have at least three number/range slider fields for using the calculation feature where two fields can be used for the input of the numbers and one field can be used to show the result of the calculation.
To enable the calculation, go to the field setting of one of the number fields where you want the result to be displayed. Then go to Calculations.
For example, in the above form, Number Field A and Number Field B are used for the input of the numbers and Number Field A+B is used for the output where we will have to enable the calculation.
Calculation Settings: #
- Decimal Places: Select the number of decimal values you would like to show on the result. For example, if you select 2, the output (if it consists of more than 2 decimal numbers) will be shown as 3.14.
- Expression Field: This is the blank space where all the calculations are to be set. For example, in the above form, the output field should show the sum of Number Field A and Number Field B. Therefore, the expression should look like:
The blank field on the Calculation settings is where the expression is to be set. For adding an expression, click on the <> button which will show the list of calculation-ready fields.
Now, you can add one field and add an operator sign from the given operators ( ) ^ / * + –. After adding the operator sign, add another field. For example, to find the sum of two number fields, add the first number field, then add the ‘+’ sign. Now, add another number field.
where, ( ) is for paranthesis, ^ is for exponent, / is for divide, * is for multiplication, + is for addition, and - is for subtraction.
Valid and Invalid Expressions: #
When you add an expression with correct operator signs and fields, the ‘Formula is valid‘ message is shown below the expression field. Else. the ‘Formula is invalid‘ expression is shown.
Once you have completed adding all the expressions, you can update the form and see the results on the frontend preview.
Using Number Fields: #
Using Range Slider Fields: #
Note: You will have to use a number field to show the result when you use the range slider as input method.
Calculation on Payment Fields #
Payments fields like single item, multiple choice, and checkbox can also be included for calculation purposes. For example, the images below show an addition between the Multiple Choice and Checkbox payment fields.