Loading ...

2.15.

You can use Polydojo forms to perform a large variety of on-the-fly calculations.

For starters, let's simply add two numbers.

- Add a '
**Number**' field labeled "**Enter X**" and check '**Show more configuration options.**'. - Against '
**Variable**', type`X`

(in caps) and click '**Done**'. - Similarly add another '
**Number**' field labeled "**Enter Y**" and set '**Variable**' to`Y`

(in caps). - Add a '
**Calculation**' field labeled "**The sum of X and Y is**". - Set '
**Expression**' to`X + Y`

(in caps); and finally click '**Done**'.

That is it! Your form will now automatically add two numbers! Let's check it out.

- Click
**Save**>**Back to forms**>*Select the form you just saved*>**Fill**. - The form will open in a new tab.
**Start typing some numbers!** - You'll see that as you type, "
**The sum of X and Y is**" is auto-calculated.

Now instead of `X + Y`

, you could've set Expression to:

`X - Y`

(Subtraction)`X / Y`

(Division)`X * Y`

(Multiplication)`X*X + Y*Y`

(Sum Of Squares)

You could add another '**Number**' field labeled '**Enter Z**', with variable `Z`

(in caps). Then, you could use compound expressions such as:

`X * (Y + Z)`

(Add, then multiply)`(X + Y + Z) / 3`

(Average)`X * (1 - 10/100)`

or`X * 0.90`

(10% Off)`Y * (1 + 18/100)`

or`X * 1.18`

(18% extra, for tax etc.)