Conditional Compare Operators
The conditional compare operators in ez Form Calculator are used to compare values in order to check if the conditional action should be performed.
> | greater than |
>= | greater or equals than |
<= | less or equals than |
= | equals |
not | equals not |
between | Checks if a number is between a min and max number. Use a colon as the separator, e.g. 50:100 (min:max) |
not between | Checks if a number is not between a min and max number |
hidden | Will only be true if the element is not visible |
selected | Returns true if the target value is present in the compare value (e.g. selected checkboxes, radio- or dropdown-values) |
selected ID | Returns true if the selected ID equals the selected ID from the target checkbox, radio or dropdown element |
selected count, selected count >, selected count < | Returns true if the selected options of the target checkbox, radio or dropdown element equals/is greater than/is less than the target value |
selected index | Returns true if the selected index of the compare value equals the compare value (the selected index is shown at the end of each option marked with a hash (#) symbol and their index number) |
not selected | Returns true if the target value is not present in the compare value |
not selected ID | Returns true if the selected ID does not equal the selected ID from the target checkbox, radio or dropdown element |
not selected count | Returns true if the selected options of the target checkbox, radio or dropdown element does not equal the target value |
not selected index | Returns true if the selected index of the compare value does not equal the compare value |
%x = 0 | This operator uses the modulo function and checks whether the compare value and the target value equals 0 |
%x != 0 | This uses the modulo function and checks whether the compare value and the target value does not equal 0 |
bitwise AND | This uses the bitwise operator and performs the AND operation on each pair of bits of the compare value and the target value |
bitwise OR | This uses the bitwise operator and performs the OR operation on each pair of bits of the compare value and the target value |
empty | Returns true if the compare value is empty |
not empty | Returns true if the compare value is not empty |
in | Checks if the compare value is present in the set of the target value. Use a vertical bar as the separator, e.g. 1|2|5|10 |
not in | Checks if the compare value is not present in the set of the target value |
once | This conditional operator will only be performed once |
always | This conditional operator will always be performed when the form changes. This operator can be useful if you check for multiple conditions and only want to check conditions in other elements. |
focus | Returns true if the target element has focus |
blur | Returns true if the target element is blurred, i.e. the focus is “lost”. Useful to perform conditional actions based on the current element, for example, set min/max values |
Step =, Step >, Step < | Returns true if the current step is equal to/greater than/less than the custom value |
Conditional Actions
In ez Form Calculator, you can perform a variety of conditional actions. Once all conditions are true in a conditional row, the selected action will be performed. The opposite action (OA) takes place automatically. If the conditional check for a conditional action, e.g. Show, is not met, the plugin will Hide the target element. Not all conditional actions have an opposite action but most of them do.
Show | Show an element or group. OA: Hide |
Hide | Hide an element or group. OA: Show |
Set | Set an element’s value to a custom value. |
Activate | Activate the calculation of an element. OA: Deactivate |
Deactivate | Deactivate the calculation of an element. OA: Activate |
Set factor | Set the factor of an element. |
Activate option | Activates a single option with the defined ID in a checkbox, radio, or dropdown element. OA: Deactivate option |
Deactivate option | Deactivates a single option with the defined ID in a checkbox, radio or dropdown element. OA: Activate option |
Select option | Selects a single option with the defined ID in a checkbox, radio or dropdown element. |
Deselect option | Deselects a single option with the defined ID in a checkbox, radio or dropdown element. |
Show option | Shows a single option with the defined ID in a checkbox, radio or dropdown element. OA: Hide option |
Hide option | Hides a single option with the defined ID in a checkbox, radio or dropdown element. OA: Show option |
Redirect | Immediately redirects the user to the target URL. Note: the URL has to start with https or http. |
Go to step | Progress to the defined step immediately. You should add a condition to check for the current step or the conditional action will take place all the time. |
Next step | Progress to the next step immediately. See Go to step note. |
Previous step | Progress to the previous step immediately. See Go to step note. |
Email target | Set the email recipient to the defined value, see Conditional email recipients. |
Set min | Set the min number in the target element. |
Set max | Set the max number in the target element. |
Set min selectable | Set the min selectable options in a checkbox element. |
Set max selectable | Set the max selectable options in a checkbox element. |
Add class | Add a CSS class to the target element. |
Remove class | Remove a CSS class from the target element. |
Set color | Set the color of the target element |
1 Comment