Skip to content

Manage Conditional Rules

This page outlines how one can manage conditional rules for Factorial Forms. Conditional rules govern the visibility and editability of pages, sections and fields based on field values or other conditions. Once a display rule has been defined, it can be assigned to a UI element while it's being newly created or from its respective properties page.

The Conditions page (displayed in the screenshot below) lists all of the UI rules that have been defined by the user and can be accessed from form management page.

Alt text

How visibility rules combine

A field or button is visible only when its page, section and field are all visible.

Page Section Field Result
Hidden Either Either Hidden
Visible Hidden Either Hidden
Visible Visible Hidden Hidden
Visible Visible Visible Visible

Either means visible or hidden; it does not change the result in that row. If there are nested sections, every enclosing section must be visible. A section with no visible content may also be hidden.

Requiredness is set on individual fields. If a required field is hidden by its own rule or by its page or section, the user is not asked to complete it and it does not block normal form validation. Its required setting applies when the field becomes visible again.

How editability rules combine

For a visible field or button, the page, section and field must all allow editing. A read-only setting or rule at any level keeps the control read only, even when another level allows editing.

Page Section Field Result
Read only Either Either Read only
Editable Read only Either Read only
Editable Editable Read only Read only
Editable Editable Editable Editable

Either means editable or read only; it does not change the result in that row. If a field is inside nested sections, every enclosing section must allow editing. Editability applies to controls that are visible under the visibility rules above.

Add a New Rule

A new display rule can be added as follows.

  1. Click on the + Add Rule button to start creating a new rule.
  2. In the drawer panel, provide a suitable rule name and click on the + Add button to choose from the following options

    Alt text

    1. Rule: Add a single rule that governs the form UI based on the value of a particular field
    2. Rule Group: Add a rule group that governs the UI visibility based on the predicate resultant from the values of multiple fields
    3. Form Rule: Choose UI visibility based on three conditions, namely, whether all pages have been visited, all pages were valid or all pages except for the current page are valid.

    Alt text ^6f7f29 3. Once the right combination of predicates have been configured as the display rule, click on the Save button to save the rule, else, click Cancel to discard everything and exit the panel without saving.

Edit an existing rule

Edit an existing rule as follows.

  1. Select the rule by clicking on the radio button next to it.

Alt text 2. Next, click on the Edit Rule button at the upper-right panel. In the drawer panel that opens, make appropriate changes to the rules as needed. 3. Click on the Save button to save the changes, else click Cancel to discard the changes.

Delete an existing rule

Follow the below steps to delete an existing rule.

  1. Select the rule to be deleted by clicking on the radio button next to it.
  2. Click on the Delete button in the upper-right panel.
  3. In the dialog box that opens up asking for confirmation, click on the Delete button to confirm and proceed with deletion, else click Close to exit without deleting.

Alt text

Use child section row counts in a rule

When adding a condition, choose Child Section Rows, select a child section, and then select one of these measures:

Measure Meaning
Total Rows Every row in the section, including blank rows.
Filled Rows Rows with at least one entered value. A partly completed row counts as filled.
Blank Rows Rows with no entered values.

Choose a comparison such as Equals or Greater Than or Equal To, then enter a whole number of zero or greater. Combine measures with And or Or like other conditions. For example, to make a custom button available only when three rows all contain data, require Total Rows equals 3, Filled Rows equals 3, and Blank Rows equals 0 in an And group. A filled row may still have invalid or missing required fields, so use validations for those checks.