You may multiply (*), divide (/), add (+), or subtract (-) any two fields.
In the example below, I’ve added the list field from our example above as well as a number field. Using the “Merge Tags” icon in the “Equation” text area, choose the fields that you would like to use in your calculation. No spaces and alpha-numeric characters only should be used in the calculation Variable Name.Įxample: my_variable, my-variable, myVariable, MyVariable You will use this name to reference the calculation in other places, including displaying the value in the form itself or in any actions. In the form builder, go to “Advanced” and then to “Calculations”:Ĭlick “Add New” to add a calculation to your form: Once you have added fields to use in your calculation, creating the calculation itself is very simple. Single checkboxes also have the “Calc Value” setting. The calc value for the field would be 3 (1 + 2, the sum of the two choice’s calc values). Using the screenshot above as a template, if the user selected both “User’s First Choice” and “User’s Second Choice” on the front end, the saved form data would read “Submitted Data 1” and “Submitted Data 2” respectively.
(Enable Developer Mode in order to display the “Calc Value” field settings.) Alternatively, any fields with a “Calc Value” in them can also be used in calculations. Creating the fields on which to base the calculationĪny field that can accept a fully numeric input can be used to base a calculation on.
In order to view the Calculations feature, you will need to enable “Developer Mode”.Ĭreating a calculation in Ninja Forms has two primary steps: