Form Category Format:
$form = [
'category' => '',
'name' => '',
'icon_class' => '',
'type' => 'helpdesk',
'is_delete' => 0,
'is_default' => 1,
'is_active' => 1,
'form_sections' => $form_sections
];
FIELD KEY | DEFINITION |
---|---|
category | Should not match any existing categories (e.g. ticket, requester, organisation, asset, problem, etc.). |
name | Name of the form displayed in the admin panel. |
icon_class | CSS class for an icon to display with the form on the Form Field Index page. |
is_delete | Always set to 0, unless it is a part of cloned forms or non-default forms. |
is_default | Always set to 1. |
is_active | Determines if the form is active and should be displayed with its icon on the Form Field Index page. |
Form Section Format:
$form_sections = [[
'sort_order' => 1,
'key' => '',
'title' => '',
'labels' => [[
'label' => '',
'language' => 'en'
]],
'form_fields' => $form_fields
]];
FIELD KEY | DEFINITION |
---|---|
sort_order | Specifies the rendering order of the section. |
key | A key must be present if it’s the default section. Custom field sections do not require a key. |
title | The title of the section. |
Form Fields Format:
$form_fields = [[
'key' => '',
'title' => '',
'data_type' => '',
'api_info' => '',
'sort_order' => 1,
'required_for_agent' => 1,
'required_for_user' => 1,
'display_for_agent' => 1,
'display_for_user' => 1,
'is_deletable' => 0,
'labels' => [[
'label' => '',
'language' => 'en'
]],
'default' => 1,
'is_observable' => 0,
'is_filterable' => 1,
'is_configurable' => 1,
'is_user_config' => 1,
'is_agent_config' => 1,
'column' => 'first',
'is_active' => 1,
'is_edit_visible' => 1,
]];
FIELD KEY | DEFINITION |
---|---|
key | Always required. If not provided, a unique key is generated to act as a custom field. |
title | The title of the field (e.g., Address). |
data_type | Supported data types include: text, text_area, mobile, decimal, file, API, select, checkbox, radio, email, number, and date. |
api_info | Supported data types include text, text_area, mobile, decimal, file, API, select, checkbox, radio, email, number, and date. |
sort_order | Specifies the order of the field. |
display_for_agent | Set to 1 if the field should display on the agent panel. |
display_for_user | Set to 1 if the field should display on the client panel. |
required_for_agent | Set to 1 if the field is required on the agent panel. |
required_for_user | Set to 1 if the field is required on the client panel. |
is_deletable | Set to 1 if the field can be deleted, otherwise set to 0. |
default | If it’s a system field, set this to 1. |
is_observable | Set to 1 if the field can be listed in Automator Modules. |
is_filterable | Set to 1 if the field can be used in filter sections. |
is_configurable | Set to 1 if the field configuration (like required/display options) is allowed from the admin panel. |
is_user_config | Set to 0 if the client panel configuration cannot be changed via the admin panel. |
is_agent_config | Set to 0 if the agent panel configuration cannot be changed via the admin panel. |
column | Determines where the field will be visible. Set as first for a single or left column and second for a right column. |
is_active | Set to 1 if the field is active and visible in the admin panel. |
is_edit_visible | Set to 1 if the field should be visible while editing. |
Form Field Labels Format Explanation
FIELD KEY | DEFINITION |
---|---|
label | The title of the field (Required). |
language | The language shortcode of the label (e.g., en for English). Must be present. |