The Calculation module is the latest addition in the collection of the weForms module. With the inclusion of this module in weForms a user can enable to calculate the value of the numeric field.
In this documentation, we will be demonstrating the activation of the Calculation module in weForms and how it works.
To activate this newly added module, simply go to Admin Dashboard→weForms→Modules then look for the calculation module. Press the toggle button on the right top corner of the calculation module to enable it as shown below.
Now in order to enable the calculation feature in your form, you will need to create a form first with the numeric field in it. To add a form simple get to weForms→All Forms→Add Form
Once you click on add form, you will find the option of selecting a template. Since you will have to enable the calculation function with a numeric field in it so, therefore, you can choose a blank form and them customize it with the customs form field option.
Now choose the numeric field from the custom fields of the form editor and customize it as per your requirement. We have customized the form to calculate grocery item quantity by naming the form Grocery Order Quantity.
Now to enable calculation click on field option and get to the Advanced Options of the bottom field. There you will see a checkbox for enabling the calculation for that field. Check that box and input all the field above the total quantity you want to calculate in the expression builder as shown in the image below. You can add, subtract, multiply, divide etc. But in this case, we have entered the field to calculate the added value of all those fields in the expression builder as shown below.
Simply save the form after that.
Now to check whether the calculation function is working in the form or not load the form in the frontend and add values in the available open fields. You will see all the value has been added together and the calculated result is being displayed in the field that you have enabled the calculation for. The field that displays the result is ‘Total Quantity(Kg)” in this case.
Hope this documentation was helpful in making you understand how the calculation modules in weForms works. If you have any further queries related to any other modules or integrations, then you can browse through our weForms modules documentation.