Skip to main content

Custom Fields

Each ticket type can define a set of custom fields that are collected when creating or editing a ticket of that type. This allows you to capture type-specific information beyond the standard ticket fields.

Schema Structure

Custom field schemas are stored as JSON in the ticket type's schema_definition column. The top-level structure is:

{
"fields": [
{ ... },
{ ... }
]
}

Supported Field Types

TypeDescription
textSingle-line text input
stringAlias for text — single-line text input
numberNumeric input
dateDate picker
textareaMulti-line text input
selectDropdown with predefined options

Field Properties

Each field in the fields array can have the following properties:

PropertyRequiredDescription
keyYesInternal storage key; must be unique within the schema
labelYesDisplay name shown on the form
typeYesOne of: text, string, number, date, textarea, select
requiredNotrue if the field must be filled in
optionsFor select onlyArray of strings listing the available choices

Where Values Are Stored

Custom field values are stored in the ticket's custom_fields JSON column, keyed by the field's key. For example, a field with key: "pio_name" would be stored as:

{
"pio_name": "John Smith"
}

Validation

Required custom fields are validated on both ticket creation and updates. Submitting a ticket without a required custom field will return a validation error.

Example: RTI Application Schema

{
"fields": [
{
"key": "pio_name",
"label": "PIO Name",
"type": "string",
"required": true
},
{
"key": "department",
"label": "Department",
"type": "string",
"required": false
},
{
"key": "mode_of_filing",
"label": "Mode of Filing",
"type": "select",
"required": true,
"options": ["online_portal", "speed_post", "in_person"]
},
{
"key": "first_appeal_deadline",
"label": "First Appeal Deadline",
"type": "date"
}
]
}