Skip to main content

Rules

Rules allow forms to adapt to user input or respond to decisions made in previous steps. This enables specific areas to be automatically shown or hidden, or input dependencies to be controlled. As a result, forms become not only clearer but also easier to use.

To manage the rules of a form, you can open the rule management using the following button at the top right of the form designer:

Rules​

Using the Add Rule button, you can add a new rule.
Each rule consists of one or more conditions and one or more actions. The condition defines when the rule should apply, and the action defines what happens when the condition is met.

You can rearrange rules using the cross icon (). If a control element is affected by multiple rules, the last rule will be used.

Each rule has the following properties:

  • Display Name:
    The display name helps you keep track of different rules. It has no other effect.

Conditions​

Each rule has one or more conditions. These conditions specify when the rule's actions should be executed.
linqi distinguishes between two types of conditions:

  • Static Conditions:
    These conditions are evaluated once when the form is opened but allow you to query a wide range of values. This can be useful, for example, if you want to check a decision made in a previous process step or whether the currently logged-in person is a member of a specific group.
  • Dynamic Conditions:
    Whenever you want to check a control from the current form, use a dynamic condition. These are checked every time the form changes.

Additionally, you can specify whether all conditions (AND) or just one (OR) must be fulfilled.

Static Condition​

Static conditions offer the following configuration options:

  • Select value:
    Here you select the value to be checked using a placeholder. This could be, for example, a value from a form, the result of a query from an external system, or even the logged-in person.
  • Select operator:
    Once you have selected a value, the available operators are displayed here. This allows you to determine whether the selected value should match a specific value, consist of more than one value, or check a person's group membership.
  • Select comparison value:
    Here you define the comparison value. You can manually enter fixed values or reference another value using a placeholder.

Dynamic Condition​

Dynamic conditions offer the following configuration options:

  • Element:
    Select the control element to be checked. This could be a checkbox like Different Billing Address.
    info

    Only saved control elements appear here. If an element is missing, you need to temporarily save the form.

  • Operator:
    Once an element is selected, the available operators will be shown here.
  • Comparison Value:
    Define the comparison value here. You can enter a fixed value or use a placeholder. For example, if the selected element is a control called Total Cost, you could choose the operator Greater Than and enter 9000 as the comparison value to react when the total cost exceeds 9000 euros.

Actions​

In this section, you define how the rule should affect the form. Above the action list, there is a toggle that lets you enable or disable the option Clear fields when hiding or showing for all actions in the rule. In addition, this option can be used per action as soon as the selected action is Hide or Show. If a field is hidden by a rule and the clear option is enabled, the field value is removed. If the field has a default value, it is reset to that default value instead. This also applies when a section is hidden: all fields inside the section are cleared or reset to their default values. Any value change caused by this behavior is treated like a regular form change and can trigger other rules again.

For each action, you define the following properties:

  • Element:
    Select the control element or section that will be affected.
    info

    Only saved control elements and sections appear here. If an element is missing, you need to temporarily save the form.

  • Clear fields when hiding or showing:
    This option is shown per action when Hide or Show is selected as the action. If it is enabled, values are removed when elements are hidden, or reset to the default value when one exists.
  • Action:
    Select the action to be executed. linqi will always execute the opposite action when the condition is not met. The following actions are available:
    • Hide:
      Hides the element when the condition is met. If the condition is not met, the element is shown.
    • Show:
      Shows the element when the condition is met. Otherwise, the element is hidden.
    • Read-only:
      Marks the element as read-only when the condition is met. Otherwise, the element can be edited.
    • Not read-only:
      Marks the element as editable when the condition is met. If the condition is not met, the element is marked as read-only.
    • Required:
      Marks the element as required when the condition is met. Otherwise, the element is no longer required.
    • Not required:
      Marks the element as not required when the condition is met. Otherwise, the element is marked as required.