View Categories

Numeric Calculation in Fluent Forms

Fluent Forms provides built-in calculation features for numeric fields, allowing you to perform real-time mathematical operations within your forms.

This guide will walk you through adding and customizing the Numeric Calculations in Fluent Forms for your WordPress site.

Adding Numeric Fields #

To learn how to add the Numeric field to Fluent Forms, follow the steps below:

First, go to the Forms section from the Fluent Forms Navbar, choose a desired Form, and click the Edit icon to open the Editor page of that form.

If you do not have any existing forms, read Create a Form from Scratch or Create a Form using Templates documentation to create a new one.

If you want to learn more about the Numeric Input Field, read this article.

editor form scaled 49746

Now add two numeric fields ( “Number One” and “Number Two”). Then, add a third numeric field to display the calculation result (“Result”).

three numeric field 02 scaled 49746

Enable Calculation Expression #

Now hover over the Result field (where you want to show the result) and click the Edit (pencil) Icon. In the right sidebar, go to Advanced Options.

Now, click on the Enable Calculation option from the Advanced Option to activate the calculation box.

Enable calculations expression 03 scaled 49746

Define the Calculation #

Now, click on the Document Icon, and it will show all the available input fields.

Select the numeric fields to be used in the calculation ( Number One, Number Two).

 Now add a mathematical operator between them ( +, -, *, /).

  • Example: Number One + Number Two

Avoid spaces between fields and operators. For a better understanding, see the screenshot below.

Document icon 04 scaled 49746

Embed the Form into the Front #

Once you complete the customization, click the Save Form button to save all your changes. Click the Preview & Design button in the middle to see the form preview.

To integrate and display the form on a specific Page or post, copy the Shortcode from the top right side and paste it into your desired Page or post

save form 05 3 scaled 49746

Preview of Added Numeric Calculation  #

Here is a preview of the form with the Numeric calculation.

preview of numeric calculation 06 49746

Conversational Forms Support #

Fluent Forms also supports calculations in Conversational Forms, enabling dynamic responses based on user input.

Example

If you have an order form where a user selects the number of items, you can calculate the total price dynamically:
Quantity * Price Per Item = Total Price

Supported Symbols

SymbolExplanation
+Addition Operator eg. 2+3 results 5
Subtraction Operator eg. 2-3 results -1
/Division operator eg 3/2 results in 1.5
*Multiplication Operator eg. 2*3 results 6
ModModulus Operator eg. 3 Mod 2 results 1
(Opening Parenthesis
)Closing Parenthesis
SigmaSummation eg. Sigma(1,100,n) results 5050
PiProduct eg. Pi(1,10,n) results 3628800
nVariable for Summation or Product
piMath constant pi returns 3.14
eMath constant e returns 2.71
CCombination operator eg. 4C2 returns 6
PPermutation operator eg. 4P2 returns 12
!factorial operator eg. 4! returns 24
loglogarithmic function with base 10 eg. log 1000 returns 3
lnnatural log function with base e eg. ln 2 returns .3010
powpower function with two operator pow(2,3) returns 8
^power operator eg. 2^3 returns 8
rootunderroot function root 4 returns 2
sinSine function
cosCosine function
tanTangent function
asinInverse Sine function
acosInverse Cosine funtion
atanInverse Tangent funtion
sinhHyperbolic Sine function
coshHyperbolic Cosine function
tanhHyperbolic Tangent function
asinhInverse Hyperbolic Sine function
acoshInverse Hyperbolic Cosine function
atanhInverse Hyperbolic Tangent function
roundMake a number a decimal/integer.Use case: round(3.235723663, 2) = 3.24and round(3.235723663, 0) = 3
ceilUse case: ceil(3.235723663) = 4
floorUse case: floor(3.235723663) = 3
maxUse case: max(10, 15) = 15
minUse case: min(10, 15) = 10

So, this is the easy process of adding Numeric Calculation of your form.

If you have any further questions, concerns, or suggestions, please do not hesitate to contact our support team. Thank you.