Using Rules

Training course

Note: The following information requires a Forms Plus license. Contact your CPIL or AiSP for more information.

Note: Rules are only available in Drag and Drop forms. If a Drag and Drop form is converted to an Advanced form, the rules are removed from the Advanced form.

The Form Rules Editor allows you to define specific rules for your form based on the state of any individual form element or section.

Rules are powerful commands that you can add to your form to perform additional validation and dynamically change and render your form based on responses to user input. A rule is a simple statement that combines a condition with an action.

  • Condition – Form Builder constantly assesses the state of Form Elements where rules are defined. When the form is loaded or a user changes a value so that a defined condition is met then an Action is triggered.
  • Actions – are changes on the form defined by the rule. In general, these changes will show or hide form elements, change their state from required to not required (or vice-versa) and/or set values on fields as appropriate.

Available Rules combinations

The table below shows the available conditions and actions that are available within Form Builder. Each Form Element type supports different conditions and actions based on its specific attributes. For example, A checkbox can be assessed to see if it is True or False (condition). A currency value can be assessed to see if it is Greater than $100 or less than $1,000,000 (condition). A text field can be set to read only (action). A new section can be revealed on the form with additional questions and information (action).

Use cases

Here are some typical examples of how rules can be deployed on a form:

Table 3: Viewing use cases
Condition (user input) Action (Form changes)
Select drop-down value of International

Set Country to Required

Display International Information text area

Display Section with international questions

Set annual company sales to $5,000,000 Change billing category to Medium Company
Check to indicate that they hold tax exempt status

Reveal the Tax Exempt entry field

Set the Tax Exempt field to Required

User does not select a four-year undergraduate program

Set checkbox marking application for special attention by staff

Show additional fields to capture more education details

Rules Editor

The Rules Editor is a special zone in the Drag and Drop Form Designer and can be found in the Form rules drop-down.

Viewing the rules editor

Adding a new rule PLUS

Do the following to add a new rule:

  1. Go to RiSE > Form library and click either Add new form or an existing drag-and-drop form.
  2. From your drag-and-drop form, click Add Rule next to Form Rules.
  3. Under Conditions, use the drop-down to choose which conditions you want the rule to follow. Each Form Element has an index number, for example (016) which is shown in brackets to differentiate between fields that may have similar names or types.
  4. Under Actions, use the drop-downs to decide which action you want the rule to perform and which condition the action relates to.
  5. Note: The available operators for each Condition and Action are defined based on the Form Element type.

    Adding a new rule

  6. Select Add Condition or Add New Action to add additional rules.
  7. Click OK and then click Save.

Once rules are created they can be reviewed. The Rules Editor shows a formatted statement for each rule in force to allow you to review the rules defined and enabled on your form. In the example below, the first rule will hide a Document field if a checkbox is selected.

Correcting disabled rules

When a field is removed from a form, any rules that used the removed field are disabled, even after the field is re-added to the form. In order to re-enable the rule, do the following:

  1. Add the missing field back to the form.
  2. Click the Edit icon in the Form rules section.
  3. Deselect the Disabled checkbox to re-enable the rule.
  4. Click OK and then click Save.

Corrected disabled rules

Rules construction

Each rule must have at least one condition and one action in order to be valid; however, a rule can have multiple conditions or actions as needed.

When more than one condition or one action is defined they are always treated as "AND" operators. To add an "OR" condition you will define a separate rule for each "OR" that is applicable.

Important! Rules using the Set Required/Set Not Required and Show Element/Hide Element actions have unique behaviors. Review Understanding Set Required/Set Not Required and Show Element/Hide element rules for more information.

Understanding rules construction

Understanding Set Required/Set Not Required and Show Element/Hide element rules

Before defining rules, review the following behaviors of Set Required/Set Not Required and Show Element/Hide element rules:

  • Default behavior – If conditions for rule are not true, the opposite behavior occurs by default.
  • Importance – When multiple rules apply to the same action, the rule defined last determines the default behavior of the element.
  • Combining rules – For best performance, use the Is One Of operator to combine rules that apply the same element.