FormFields
Introduction
FormFields define the inputs and informational elements of Forms.
Rich-text values in default_value and type-specific config keys use the shared Rich Text HTML format. This applies to the rich-text and description type values and the privacy-policy type's config.text value.
Model Definition
Alias
formField
Capabilities
Entity Permissions - Access is inherited through the parent form.
Translations - Localizes
name,default_value,placeholder, anddescription; examples useen-US.
Relations
List
List visible FormFields.
Definition
GET /api/forms/fields
Behavior
The results can be further restricted using Result Control filters.
Example Request
Example Response
List by Form
List visible FormFields for one Form.
Definition
GET /api/forms/{formEntity}/fields
Route Parameters
formEntity
integer
Form ID.
Behavior
The results can be further restricted using Result Control filters.
Example Request
Example Response
Show
Show one visible FormField.
Definition
GET /api/forms/fields/{formField}
Route Parameters
formField
integer
Form field ID.
Example Request
Example Response
List Preselected Entities
List entities preselected for one FormField.
Definition
POST /api/forms/fields/{formField}/preselected-entities
Route Parameters
formField
integer
Entity-select form field ID.
Behavior
The field must use an entity-select type. Its
default_valuesupplies the selected entity IDs.Result Control filters further restrict the preselected IDs; they cannot broaden the selection.
This endpoint uses count-less pagination, so
totalisnull.
Example Request
Example Response
List Selectable Entities
List entities selectable for one FormField.
Definition
POST /api/forms/fields/{formField}/selectable-entities
Route Parameters
formField
integer
Entity-select form field ID.
Behavior
Result Control filters further restrict the configured selection; they cannot broaden it.
This endpoint uses count-less pagination, so
totalisnull.
Example Request
Example Response
List Entity Filters
List selectable-entity filters for one FormField.
Definition
POST /api/forms/fields/{formField}/selectable-entities/filters
Route Parameters
formField
integer
Entity-select form field ID.
Behavior
Result Control filters further restrict the configured selection when available filter options are calculated.
Example Request
Example Response
List Entity Filter Options
List options for one selectable-entity filter of a FormField.
Definition
POST /api/forms/fields/{formField}/selectable-entities/{filterKey}/options
Route Parameters
formField
integer
Entity-select form field ID.
filterKey
string
Multi-select filter key.
Behavior
This endpoint uses count-less pagination, so
totalisnull.Use Result Control filters to further restrict the configured selection; request filters cannot broaden it.
Example Request
Example Response
Admin: List
List all FormFields in administration scope.
Definition
GET /api/administration/forms/fields
Behavior
The administration list may include soft-deleted fields.
The results can be further restricted using Result Control filters.
Example Request
Example Response
Admin: List by Form
List all FormFields for one Form in administration scope.
Definition
GET /api/administration/forms/{formEntity}/fields
Route Parameters
formEntity
integer
Form ID.
Behavior
The results can be further restricted using Result Control filters.
Example Request
Example Response
Admin: Show
Show one FormField in administration scope.
Definition
GET /api/administration/forms/fields/{formField}
Route Parameters
formField
integer
Form field ID.
Example Request
Example Response
Admin: Create
Create a new FormField.
Definition
POST /api/administration/forms/fields
Request Keys
form_type*
string
form for backwards compatibility
Parent morph alias.
lang_id
string
System language
Language key. Use en-US for this example.
name*
string
-
Field label.
slug
string
Generated from name
Source for the normalized key.
default_value
mixed
null
Default field value.
placeholder
string | null
null
Input placeholder.
description
string | null
null
Help text.
hidden
boolean
false
Hide the field.
disabled
boolean
false
Disable user input.
config
object
Type default
Complete type-specific configuration documented with the selected Form Field Type.
layout_column_id
integer
Current assignment
Optional column belonging to a layout assigned to the field's parent.
layout_column_data
object
{}
Column assignment data.
layout_column_data.sort_number
integer
Automatic
Position in the destination column.
Keys with * are required after backwards-compatible defaults are applied.
Behavior
layout_column_idis optional. Supplying it assigns the field to that column and removes other column assignments. Omitting it preserves placement on update;layout_column_dataalone does not change the placement.When
configis omitted, the selected type'sdefault_configis inserted before validation.Defaults containing editor placeholders still require a complete config. In particular,
entity-selectandentities-selectrequire a selectableentity_type.
Example Request
Example Response
Admin: Update
Update an existing FormField.
Definition
PUT /api/administration/forms/fields/{formField}
Route Parameters
formField
integer
Form field ID.
Request Keys
lang_id
string
Current value
Language key.
name
string
Current value
Field label.
slug
string
Generated from changed name
Source for the normalized key.
default_value
mixed
Current value
Default field value.
placeholder
string | null
Current value
Input placeholder.
description
string | null
Current value
Help text.
hidden
boolean
Current value
Hide the field.
disabled
boolean
Current value
Disable user input.
config
object
Current or type default
Type-specific configuration documented with the selected Form Field Type.
layout_column_id
integer
Current assignment
Optional column belonging to a layout assigned to the field's parent.
layout_column_data
object
{}
Column assignment data.
layout_column_data.sort_number
integer
Automatic
Position in the destination column.
Behavior
layout_column_idis optional. Supplying it assigns the field to that column and removes other column assignments. Omitting it preserves placement on update;layout_column_dataalone does not change the placement.When the field type is unchanged and
configis omitted, validation reuses the current config.When
form_field_type_idchanges andconfigis omitted, validation uses the new type'sdefault_config. Submitconfigin the same request when that default contains required editor placeholders.
Example Request
Example Response
Admin: Delete
Delete an existing FormField.
Definition
DELETE /api/administration/forms/fields/{formField}
Route Parameters
formField
integer
Form field ID.
Example Request
Example Response
Last updated