Adding Conditional Logic to a Ticket Form
Create smarter forms by adding conditional logic that shows or hides fields based on user input.
For example, a software access request form includes a question asking whether requested access is temporary. Start date and end date can be set as dependent fields that only appear if the answer is yes.
Rules can be organized by actor type: anybody (all users), contacts, staff, logged-in users, and logged-out users. A form can have rules across multiple actor groups at once.
Set up the form first
See Customizing the Ticket Form for steps on creating the form, adding and sorting fields, setting default values, and creating custom fields.
Adding rules
- Navigate to the ticket form and click the
rulestab. - Fields intended for conditional display must be hidden. If the dependent field is not already hidden, click
changeto hide it. - Click
+next to the matching actor section to add a new rule. - Select the
Fieldto apply the condition to. - Define the trigger
Condition,Value, andActor - Select the fields to hide and show.
- Click
save. - Add as many rules as needed.
Rule behavior
- Rules are scoped by actor type. A rule set for staff does not apply when the form is filled out by a contact.
- A field can be the target of more than one rule.
- If a hidden field is required, the requirement does not apply while the field is hidden.
- Deleting a field removes it from all the rules that target it. A rule is completely deleted if removing the field leaves it with no remaining show/hide targets. If a deleted field is the rule's condition, the condition row is removed but the rule row itself may remain.
Was this article helpful?