TaskFields

Introduction

TaskFields define which values users can enter while progressing or finishing a TaskExecution.

They are stored as decorated form fields on TaskTemplates.

Model Definition

Alias

formField

Relations

Relation
Key
Type
Relation Field(s)

form

Belongs to

form_id, form_type

fieldType

Belongs to

form_field_type_id

fieldValidations

Has many

form_field_validations.form_field_id

[Adm.] List

Definition

GET /api/administration/tasks-2/templates/fields

Request Keys

No additional request keys.

Example Request

Example Response

[Adm.] List by template

Definition

GET /api/administration/tasks-2/templates/{formEntity}/fields

Request Keys

Key
Type
Default
Description

formEntity

integer

-

TaskTemplate ID

Example Request

Example Response

[Adm.] Create

Definition

POST /api/administration/tasks-2/templates/fields

Request Keys

Key
Type
Default
Description

form_type*

string

-

Morph alias of container entity. Use taskTemplate.

form_id*

integer

-

Related TaskTemplate ID.

form_field_type_id*

string

-

Type key from TaskFieldTypes.

lang_id

string

system language

Language key for translated field text.

name*

string

-

Field label shown in task UI.

slug

string

derived from name

Technical slug, normalized automatically.

default_value

mixed

null

Static default value.

placeholder

string

null

Placeholder text.

description

string

null

Help text shown in UI.

hidden

boolean

false

Hide field in UI.

disabled

boolean

false

Disable field input.

config

object

type defaults

Type-specific configuration object.

Keys with * are required.

Example Request

Example Response

[Adm.] Update

Definition

PUT /api/administration/tasks-2/templates/fields/{formField}

Request Keys

Key
Type
Description

formField

integer

Route parameter. Field ID to update.

form_field_type_id

string

New field type key.

lang_id

string

New language key.

name

string

New label.

slug

string

New technical slug.

default_value

mixed

New static default value.

placeholder

string

New placeholder text.

description

string

New help text.

hidden

boolean

New hidden state.

disabled

boolean

New disabled state.

config

object

Updated type-specific configuration.

Example Request

Example Response

[Adm.] Delete

Definition

DELETE /api/administration/tasks-2/templates/fields/{formField}

Request Keys

Key
Type
Default
Description

formField

integer

-

Field ID.

Example Request

Example Response

Entity-select helpers

These routes are relevant for entity-select and entities-select fields.

List preselected entities

Definition

POST /api/tasks-2/templates/fields/{formField}/preselected-entities

Request Keys

Key
Type
Default
Description

formField

integer

-

Field ID.

No additional JSON body keys are required.

Example Request

Example Response

List selectable entities

Definition

POST /api/tasks-2/templates/fields/{formField}/selectable-entities

Request Keys

Key
Type
Default
Description

formField

integer

-

Field ID.

No additional JSON body keys are required.

Example Request

Example Response

List selectable-entity filters

Definition

POST /api/tasks-2/templates/fields/{formField}/selectable-entities/filters

Request Keys

Key
Type
Default
Description

formField

integer

-

Field ID.

No additional JSON body keys are required.

Example Request

Example Response

List selectable-entity filter options

Definition

POST /api/tasks-2/templates/fields/{formField}/selectable-entities/{filterKey}/options

Request Keys

Key
Type
Default
Description

formField

integer

-

Field ID.

filterKey

string

-

Filter key.

No additional JSON body keys are required.

Example Request

Example Response

Last updated