FormFields
Introduction
FormFields are components of a Form. They describe the input fields that are available in a specific Form.
Further information about the FormFields behaviour is described by the FormFieldType and attached FormFieldValidations.
Model Definition
Alias
formField
Relations
Traits
SortableLayoutElement
List
Get a list of all FormFields the current authenticated User is allowed to view.
Definition
GET /api/forms/fields
Example Request
Example Response
List by Form
Get a list of all FormFields the current authenticated User is allowed to view by Form.
Definition
GET /api/forms/{formId}/fields
Example Request
Example Response
Show
Show a single FormField by id.
Definition
GET /api/forms/fields/{id}
Example Request
Example Response
[Adm.] List
Get a list of all FormFields.
Definition
GET /api/administration/forms/fields
Example Request
Example Response
[Adm.] List referring to Forms
Get a list of all FormFields that refer to a Form.
Definition
GET /api/administration/forms/fields/form
Example Request
Example Response
[Adm.] List referring to TaskTemplates
Get a list of all FormFields that refer to a TaskTemplate.
Definition
GET /api/administration/tasks-2/templates/fields/
Example Request
Example Response
[Adm.] Create
Create a new FormField.
Definition
POST /api/administration/forms/fields
Request Keys
form_type *
string
-
The type of the Form relation (either form or task)
name *
string
-
The name of the FormField (unique by Form)
key
string
Slugged name
The key to identify the FormField (unique by Form)
default_value
mixed
null
The default value of the FormField
placeholder
string
null
The placeholder of the FormField
description
string
null
The description of the FormField
Keys with * are required.
Example Request
Example Response
[Adm.] Update
Update an existing FormField by id.
Definition
PUT /api/administration/forms/fields/{id}
Request Keys
name
string
The name of the FormField (unique by Form)
key
string
The key to identify the FormField (unique by Form)
config
json
The config that is used to setup the FormField
default_value
mixed
The default value of the FormField
placeholder
string
The placeholder of the FormField
description
string
The description of the FormField
Example Request
Example Response
[Adm.] Delete
Delete an existing FormField by id.
Definition
DELETE /api/administration/forms/fields/{id}
Example Request
Example Response
Field entity select
These endpoints provide selectable and preselected entity data for entity-select and entities-select fields.
For field configuration details, see:
Currently available filters by entity type
The available filters are resolved from backend entity-preview filter configuration and returned by .../selectable-entities/filters.
user
useruser_text_search
text
[]
-
role.department.id
multi-select
[]
department_text_search
department
departmentname
text
value
-
tags.id
multi-select
[]
department_tag_text_search
1) Preselected entities
Returns preselected entities based on default_value of the field.
User definition
POST /api/forms/fields/{formField}/preselected-entities
Administration definition
POST /api/administration/forms/fields/{formField}/preselected-entities
Example Request
Example Response
2) Selectable entities
Returns selectable entities based on field config filters and optional request filters.
User definition
POST /api/forms/fields/{formField}/selectable-entities
Administration definition
POST /api/administration/forms/fields/{formField}/selectable-entities
Example Request
Example Response
3) Selectable-entity filters
Returns available filter definitions for selectable entities.
User definition
POST /api/forms/fields/{formField}/selectable-entities/filters
Administration definition
POST /api/administration/forms/fields/{formField}/selectable-entities/filters
Example Request
Example Response
4) Selectable-entity filter options
Returns paginated options for one multi-select filter key.
User definition
POST /api/forms/fields/{formField}/selectable-entities/{filterKey}/options
Administration definition
POST /api/administration/forms/fields/{formField}/selectable-entities/{filterKey}/options
Example Request
Example Response
Last updated