When using forms in your processes it can be useful to change form field settings depending on previous selections or inputs in the form. The rules editor makes it easy to change if a field is optional or not, hidden or shown or if it is enabled or disabled according to conditions depending on previous inputs i the form.
Add form rules
- Open your form and click on the Form rules icon in the upper menu
- Click on Add new rule
- Select a form field, a condition (see all conditions below) and, if requested, a compare value.
- State the action by selecting a second form field and choose an action for that field (see all available actions below)
If desired, add more conditions and actions.
Click on OK.
NOTE: In order to add more conditions to a rule you must first create the basic rule of one condition and one action.
- Is equal to - Use for comparing exactly with the compare value
- Is not equal to - Use to make sure the value isn't equal to the compare value
- Contains - Check if the selected field contains the compare value
- Does not contain - Check if the selected field does not contains the compare value
- Starts with - Check if the selected field starts with the compare value
- Doesn't start with - Check if the selected field does not starts with the compare value
- Ends with - Check if the selected field ends with the compare value
- Doesn't end with - Check if the selected field does not end with the compare value
- Is empty - Check that the form field is empty
- Is filled - Check that the form field contains information
- Any of - Check that the selected field contains any of the compare values in the given comma separated list.
- Not any of - Check that the selected field does not contains any of the compare values in the given comma separated list.
NOTE: All available conditions do not apply to all kinds of field types. For example checkboxes can only be empty or filled.
- Required - The form field will be mandatory to fill
- Optional - The form field will be optional to fill
- Hidden - The form field will be hidden
- Hidden and Cleared - The form field will be hidden and emptied
- Shown - The form field will be shown
- Enabled - The form field will be enabled and can be edited
- Disabled - The form field will be disabled and can't be edited
NOTE: A field that has a contradicting rule statement to the allowBlank = true/false attribute will always be considered optional/mandatory based on the attribute and not the rule. This is because the allowBlank attribute is always executed despite any form rules.
On the other hand, any other attribute such as allowBlankInViewMode, hidden and disabled can be overridden by a contradicting form rule.
Edit or remove form rules
- Open the Form rules editor
- a) If you want to remove an entire rule and all its actions klick on the trash can to the right of the rule
b) If you want to edit a specific rule, click on the pen symbol to the right of the rule, settings for the condition and the actions are shown. Edit as desired and click on OK to save the new settings.
Click on Save.
TIP: You can also disable a rule if you like to pause its conditions and actions but not remove the setting totally. Click on the square symbol to the right of a rule to inactivate the rule.
Execution of form rules
Form rules are executed from top to bottom. You can drag and drop rules in order to change the order they execute in.