Use Rules in forms to control the behavior of a form. Form rules provides the ability to:

  • Apply logic to forms and make them more dynamic

  • Adapt forms when user enters data

  • Display only relevant information to users

  • Improve the accuracy of data that is submitted

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, enroll in Nintex University courses.

Types of rules

There are two types of rules you can create for forms.

Form rules

Use form rules to set behavior and values for fields when users enter data into form fields, or when default values of your controls determine the behavior of your forms on load. You can modify the values and behavior of form fields using form rules. For example, you want users to enter more details if they select Yes in an RSVP online form. For step-by-step instructions, see Step-by-step example: Create an RSVP 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.

Submit rules

Use submit rules to set behavior and values for fields which occur when user submits the form. You can use submit rules to set custom validation messages when submitting a form. For example, you can specify a custom validation message to be displayed if the user doesn't enter a valid value in a form field.

Add rules to your form

  1. Click Rules tab at the top of the forms designer.
  2. Decide which of the following rules you want and complete the following:
    • Form Rules: Click Add form rule to add rules to set behavior and values for fields which occur when users enter data into the form.
    • Submit Rules: Click Add submit rule to add rules to show custom validation messages, which display when users attempt a form submission.
  3. Complete the fields for the new rule as follows:
    • For Apply to, select the form or a repeating section to apply the rule to. (Available only if you have a repeating section control in the form.)
    • 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 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 the Preview tab 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.

Search for a rule

You can search for a rule using the rule name, variable, or control name. All rules that match the search text are displayed.

  1. Click Rules tab at the top of the forms designer.
  2. In the Form rules or Submit rules sections, enter the text you want in the Search box.
  3. All rules containing the rule, control or variable name are displayed.

    To clear the search, click x on the right of the Search box.