Overview
Form configuration enables:- Dynamic field visibility based on user selections
- Hidden fields for metadata and routing
- Validation rules for data integrity
- Custom field types for different input needs
Prerequisites
- Admin access to configure forms
- Understanding of your ticketing workflow
- Field definitions for your use case
Field Types
To create a field that behaves as hidden (not visible to users but included in submissions), set the
is_hidden property to true on any field type.Conditional Fields
Conditional fields display based on the value of another field. This creates dynamic forms that adapt to user selections.Conditional fields help reduce form complexity by showing only relevant fields based on user choices.
Configuration Options
Example: Issue Type Routing
Create fields that appear based on issue type selection: Step 1: Create the parent fieldMultiple Conditions
For complex forms, chain conditional fields:Hidden Fields
Hidden fields pass values to the ticketing system without displaying them to users.Use Cases
Configuration
Setting Hidden Values Dynamically
Pass hidden field values via the widget API:Validation
Validation behavior varies by field visibility:
- Hidden fields: Not validated
- Conditional fields: Validated only when visible
- Required conditional fields: Error shown only when field is displayed
Available Validation Options
Regex Validation
Use theregexp field type or set regexp_for_validation on any field to enforce a pattern:
Ticket Form Settings
When configuring forms for ticketing, additional settings control behavior and integration with external systems.Form-Level Properties
Success Messages
Customize what users see after submitting a ticket:AI Prefilling (System Prompt)
Configure how AI extracts ticket information from conversations:- Be specific about field formats and lengths
- Provide examples of expected output
- Mention keywords that indicate priority levels
- List available categories/options for select fields
Zendesk-Specific Settings
Static Tags:Complete Ticket Form Example
Complete Form Example
Here’s a comprehensive form configuration with conditional fields and validation:Best Practices
Form Design
- Keep forms short: Only ask for essential information
- Use conditional fields: Hide complexity until needed
- Provide helpful placeholders: Guide users on expected input
- Order logically: Most important fields first
Validation
- Validate on blur: Give immediate feedback
- Use clear error messages: Explain what’s wrong and how to fix it
- Don’t over-validate: Accept reasonable variations
Hidden Fields
- Document hidden fields: Track what metadata is being captured
- Don’t rely on hidden fields for security: They’re visible in source
- Use for routing and context: Perfect for ticket categorization
Troubleshooting
Issue: Conditional field not appearing
Issue: Conditional field not appearing
Problem: Field doesn’t show when parent value is selected.Solutions:
- Verify
conditional_fieldmatches the parent field’sidexactly - Check
conditional_field_valuematches an option value (not label) - Ensure parent field is rendered before conditional field
- Check browser console for JavaScript errors
Issue: Validation not triggering
Issue: Validation not triggering
Problem: Invalid input is accepted.Solutions:
- Confirm validation rules are properly formatted
- Check if field is hidden (hidden fields skip validation)
- Verify conditional field is visible (hidden conditionals skip validation)
- Test regex patterns separately before adding to config
Issue: Form not rendering
Issue: Form not rendering
Problem: Form doesn’t appear in widget.Solutions:
- Verify form is associated with the correct agent
- Check form configuration for JSON syntax errors
- Ensure all required field properties are present
- Review browser console for rendering errors
Related Documentation
- Ticketing System - Complete ticketing documentation
- Widget Configuration - Widget embedding options
- Ticketing API - Ticket creation API reference
