Add logic rules to custom forms and fields
CREATED FOR:
- Admin
The highlighted information on this page refers to functionality not yet generally available. It is available only in the Preview Sandbox environment.
Logic rules allow you to further customize the fields on your form.
For example, you can display or skip fields or sections in a custom form based on the choices that a user makes when filling it out.
Access requirements
You must have the following access to perform the steps in this article:
New: Standard
or
Current: Plan
For more detail about the information in this table, see Access requirements in Workfront documentation.
Display and skip logic icons
Custom forms display icons to indicate when display or skip logic is applied to certain fields. Icons on a field in the form designer indicate that logic is applied to the field.




Select a field with logic applied to display the existing logic rules in the field settings.
Considerations for using display logic and skip logic
-
To add display logic on a custom field, widget, or section break, at least one multiple choice field (radio buttons, dropdown, or check boxes) must be positioned prior to it on the form.
For information about custom fields and widgets in custom forms, see Create a custom form. -
You cannot add skip logic to a widget or section break. You can add it only to a multiple choice field (radio buttons, dropdown, or check boxes).
-
You cannot apply display or skip logic to show or hide the choices of a multi-option field. For example, you cannot restrict the choices that display for a Dropdown, a Checkbox group, or a Radio Button field, based on the display or skip logic of another field.
-
You can add both display logic and skip logic to a custom field if all of the following is true about the custom field:
- It is a multiple choice field (radio buttons, dropdown, or check boxes)
- It is preceded by a multiple choice field
- It is followed by another custom field
-
When copying forms with display logic or skip logic, the logic is copied to the new custom form.
-
When editing objects in bulk, all custom fields display in the Edit objects box, including the fields that are skipped or hidden.
-
Keep the following in mind when you create a display logic rule for a custom form:
- Custom fields not included in a display logic statement show on a custom form, by default.
- You can create multi-field display logic statements.
- If all of the fields under a section break have display logic applied to them and they are all hidden as a result of the logic, the entire section will be hidden on the custom form.
Add display logic to a custom form
Display logic defines which custom fields appear on the form when the user selects a specific value in a multiple choice field. The logic is added to the target field, which is only displayed when the value is selected.
-
Click the Main Menu icon
-
Click Custom Forms.
-
Create a new custom form or open an existing form. See Create a custom form for details.
-
Add fields to the form as needed. At least one multiple choice field (radio button, dropdown, or check box) must be positioned prior to the target field that will display.
-
Select the target field and click Add Logic.
-
Select the Display tab on the logic builder.
-
Click Add Display Rule.
Sample image in the Preview environment:
Sample image in the Production environment:
-
Follow the steps below to create the logic statement in the builder.
-
The first option is to choose the defining field. This is the field with the selection value that displays the target. It must be a multiple choice field.
-
The second option is to choose the selection value. Only the values already defined for that field are available.
-
The third option is Selected or Not Selected. Choosing Selected means that when the value is selected, the target field is displayed. Choosing Not Selected means that when any other value is selected in the defining field, the target field is displayed.
-
To add an And rule to the logic statement, click Add Rule directly underneath the rule you just created. Follow the same prompts to build the rule. All of the And rules must be met for the target field to be displayed.
Sample image in the Preview environment:
Sample image in the Production environment:
-
To add an Or rule to the logic statement, click Add Rule near the bottom of the logic builder. Then, click Add Rule inside the Or area and follow the same prompts to build the rule. When one Or rule is met, the target field is displayed.
-
-
Click Save or Apply when you are finished building the logic statement.
The display logic icons are added to the target field and the defining field in the form designer.
Add skip logic to a custom form
Skip logic defines custom form fields that are skipped when the user selects a specific value in a multiple choice field. Skipped fields are hidden on the form. The logic is applied to the defining field where the selection is made, not to the fields that are skipped.
-
Click the Main Menu icon
-
Click Custom Forms.
-
Create a new custom form or open an existing form. See Create a custom form for details.
-
Add fields to the form as needed. The defining field for skip logic must be a multiple choice field (radio button, dropdown, or check box).
-
Select the defining field and click Add Logic on the lower left of the screen.
-
Select the Skip tab on the logic builder.
-
Click Add Skip Rule.
Sample image in the Preview environment:
Sample image in the Production environment:
-
Follow the steps below to create the logic statement in the builder.
-
The defining field is shown on the builder. It is the field you selected to apply the skip logic to.
-
The first option is to choose the selection value. Only the values already defined for the field are available.
-
The second option is Selected or Not Selected. Choosing Selected means that when the value is selected, the target field is displayed and the fields in between are skipped. Choosing Not Selected means that when any other value is selected in the defining field, the target field is displayed and the fields in between are skipped.
-
The third option is the target field, or where to skip to. Select a field name or End of form. You might need to click the word “empty” first before selecting an option.
Sample image in the Preview environment:
Sample image in the Production environment:
-
To add an Or rule to the logic statement, click Add Rule near the bottom of the logic builder. Then, select the options following the same prompts to build the rule. When one Or rule is met, the target field is displayed.
-
-
Click Save or Apply when you are finished building the logic statement.
The skip logic icons are added to the target field and the defining field in the form designer.
Add validation logic to a custom form
Validation logic is built using formulas, and you can make the logic as simple or as complex as you need. The validation can be based on the values of other fields or the status of objects, and you can provide an error message for when the validation fails.
If the field with the logic applied meets the defined validation conditions when a user fills out the custom form, the field is highlighted and the error message is displayed.
You can apply validation logic to the following field types: single line text, paragraph, single select dropdown, multi-select dropdown, external lookup, radio buttons, checkbox group, and typeahead.
Examples
Using the following condition, the Budget field displays a message underneath the field when the user enters a value that triggers the message. For example, if the entered value is negative, the first message is displayed. If the user tries to change the project status to Current before entering a budget value, the second message is displayed.
IF({DE:Budget Field} < 0,
"Budget cannot be negative",
IF({DE:Budget Field} == 0 && {status} == "CUR", "Budget must be specified before moving to Current status")
)
Another simple example is that a phone number field must contain a certain number of digits to be valid.
An additional example for validation based on other fields is a field for meeting room size (small, medium, or large) and a separate field for the number of meeting attendees. The number of people for each room size is written in the validation formula. If the number of attendees the user enters is too many for the chosen meeting room, the error message is displayed.
Define validation logic
-
Click the Main Menu icon
-
Click Custom Forms.
-
Create a new custom form or open an existing form. See Create a custom form for details.
-
Add fields to the form as needed.
-
Select the field to apply logic to, and click Add Logic.
-
Select the Validation tab on the logic builder.
-
Build the validation condition in the editor, including the error message to display when the validation is not met.
For more information about calculations and expressions, see Add calculated fields to a form and Overview of calculated data expressions.
-
Click Apply.
The logic is applied to the field in the form designer.