Basic If-Clauses
Arclab® Web Form Builder
If-Clauses
With the form element If-Clauses you can carry out simple logical comparisons
in order to set the value of a field dependent on the value of another field.
This can be done for numerical values as well as for
texts (strings).
There are two different elements in the program for this:
- Basic If-Clauses: Live Conditional Field
- Basic If-Clauses: Update Hidden Fields
The difference between the two elements is that with "Live Hidden Field" a new field is created, while with "Update Hidden Fields" only existing "Hidden Fields" are assigned a new value.
The following comparison operators are available for this:
== equal to
!=
not equal
> greater than
<
less than
>= greater than or equal
to
<= less than or equal to
Please note that you can only assign a numerical value or text to the "Basic If-Clauses" in the "then" part. If you want to assign the value of another field if the condition is met, use the form element "If-Then-(Else)-Clause: Update Hidden Fields" instead.
In the following example, a new field with the name
"Price" is to be created, the value of which depends on the value of the
"Number" (numerical) field.
Use "Basic If-Clauses: Live Conditional
Field"
In the following example, a new field with the name
"Price" is to be created, the value of which depends on the value of the
"Option" (dropdown) field.
Use "Basic If-Clauses: Live Conditional
Field"
Please note that the value of the item does not necessarily have to correspond to the text displayed in the dropdown. Always use the value of the corresponding field for all logic elements if it differs from the displayed text.
In the following example the already created "Hidden Fields"
with the names "Price" and "Product" are to be assigned depending on the
selected "Option".
Use "Basic If-Clauses: Update Hidden Fields"
It is important that the fields ("Hidden Fields") to which you want to assign a value have already been created, e.g.:
The fields "Price" and "Product" should be assigned depending on the selected "Option" (dropdown):
Please note that the value of the item does not necessarily have to correspond to the text displayed in the dropdown. Always use the value of the corresponding field for all logic elements if it differs from the displayed text.
If the "If-Clauses" are not sufficient, simply add another element of the type "Basic If-Clauses: Update Hidden Fields" and continue with the new element.