Rules

In the Rules tab, you can create rules to apply logic to your forms and ensure the form adapts when users enter data into fields and submit the form.

There are two types of rules you can create for forms to save your users time and improve accuracy of the data you capture:

  • Form Rules: set behavior and values for fields which occur when users enter data into form fields, or when default values of your controls determine the behavior of your forms on load.
  • Submit Rules: set behavior and values for fields which occur when user submits the form.

Note: The capability to create On form load rules is being deprecated. Existing rules will continue to be available in the On form load section, which you can update or delete. On form load rules are behaviors and values for fields that load before the user interacts with the form. For more information and guidance, see this video.

An example of a rule is when you want to show a set of controls only when a user comes from Australia based on a query run to the browser URL. See this example in action.

Another sample scenario is when you want to compare values between two of the same controls. In a form, there could be two Email fields: Email and Confirm Email. You can create a rule that checks if the user enters the same email address in these two form fields. If true, the form can be submitted. Else, an error message appears.

To master the use of rules, take the SELF: Automating Complex Processes - Nintex Workflow Cloud course in Nintex University.

Add rules to your form

  1. Click Rules tab at the top of the forms designer.
  2. In the Rule builder dialog box, click Add new to the right of the type of rule you want.
    • Form Rules: Add rules to set behavior and values for fields which occur when users enter data into the form.
    • Submit Rules: Add rules to show custom validation messages, which display when users attempt a form submission.
  3. Fill in the fields of the new rule as follows.
    • For Name, type a user-friendly name for your rule.
    • For If, define one or more conditions triggering the rule.
    • For Then, define one or more actions to occur if the rule is true.
    • For Else, define one or more actions to occur if the If/Then clause is not true.

    Note: Click Insert if you want to insert form controls, data source variables, or variables with applied formulas. For more information on the Insert window, see Insert window fields, buttons and settings. For more information on data source variables, see Data source variables.

  4. Click Create rule to save your configuration.
  5. To see your new rule in action, click Preview on the upper left of the forms designer.

For more information on the fields and settings of the Rule builder page, see Rule builder fields, buttons and settings.