Getting values from URL

Posted by:

Note: In order to follow this tutorial you will need the Essentials add on

You might want to get values from the URL for example you might have a URL like this:

HTTP://www.example.com?myparameter=hello

And you might want to fill a field using the value of myparameter (in this case it would be “hello”)

To do so follow these steps:

1.- Select the field that you want to fill with this value and open the formula editor

2.- Click on “Add function”

3.- Select the function “GetParameter”

4.- Configure the function, this function just needs the name of the parameter that you want to use, in my previous example (HTTP://www.example.com?myparameter=hello) my parameter is called “myparameter” so I will use that

That’s it! Now the field that I selected will be automatically filled using the parameter from my URL.

0

Using conditions

Posted by:

Sometimes you will want to add conditions to your formulas, for example you might want to use different calculations depending on what options in your form are selected.

if(Condition)
  operation
else
  operation

Example:

The condition above will check the value of the dropdown, if the “Option 1” is selected the formula value will be 1, otherwise it will be 2.

The else section is optional, if you want you can create many conditions like this:

In the example above the formula value will be 1 if option 2 is selected, 2 if option 2 is selected or 3 if option 3 is selected.

You can also do arithmetical operations inside the conditions for more complex calculations:

Or even add conditions inside other conditions:
0

Using formulas to calculate a price

Posted by:

The plugin comes with several preconfigured ways to calculate prices but if you want to create your own calculation you can use the price type “Formula”

Selecting that option will open the formula builder

In here you can put your formula, most of the times your formula will just be an arithmetical operation but you can do a lot more things like adding conditions (explained in another tutorial).

You can click on the add field button to add one field to your formula

The add function button will let you add useful operations like rounding a number

Every time you do a modification to the formula the plugin will automatically validate it and will let you know if there is any error with it

0