Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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, and description; examples use en-US.

Relations

Key
Relation
Type
Relation Field(s)

form

Form or another supported form entity

Morph to

form_type, form_id

fieldType

Belongs to

form_field_type_id

defaultValueSources

Has many

form_field_id

fieldValidations

Has many

form_field_id

displayConditions

Has many

Attachables

layoutColumns

Morph to many

layout_column_layout_element

List

List visible FormFields.

Definition

GET /api/forms/fields

Behavior

Example Request

Example Response

List by Form

List visible FormFields for one Form.

Definition

GET /api/forms/{formEntity}/fields

Route Parameters

Parameter
Type
Description

formEntity

integer

Form ID.

Behavior

Example Request

Example Response

Show

Show one visible FormField.

Definition

GET /api/forms/fields/{formField}

Route Parameters

Parameter
Type
Description

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

Parameter
Type
Description

formField

integer

Entity-select form field ID.

Behavior

  • The field must use an entity-select type. Its default_value supplies the selected entity IDs.

  • Result Control filters further restrict the preselected IDs; they cannot broaden the selection.

  • This endpoint uses count-less pagination, so total is null.

Example Request

Example Response

List Selectable Entities

List entities selectable for one FormField.

Definition

POST /api/forms/fields/{formField}/selectable-entities

Route Parameters

Parameter
Type
Description

formField

integer

Entity-select form field ID.

Behavior

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

Parameter
Type
Description

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

Parameter
Type
Description

formField

integer

Entity-select form field ID.

filterKey

string

Multi-select filter key.

Behavior

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

Parameter
Type
Description

formEntity

integer

Form ID.

Behavior

Example Request

Example Response

Admin: Show

Show one FormField in administration scope.

Definition

GET /api/administration/forms/fields/{formField}

Route Parameters

Parameter
Type
Description

formField

integer

Form field ID.

Example Request

Example Response

Admin: Create

Create a new FormField.

Definition

POST /api/administration/forms/fields

Request Keys

Key
Type
Default
Description

form_type*

string

form for backwards compatibility

Parent morph alias.

form_id*

integer

-

Parent Form ID.

form_field_type_id*

string

text for backwards compatibility

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_id is optional. Supplying it assigns the field to that column and removes other column assignments. Omitting it preserves placement on update; layout_column_data alone does not change the placement.

  • When config is omitted, the selected type's default_config is inserted before validation.

  • Defaults containing editor placeholders still require a complete config. In particular, entity-select and entities-select require a selectable entity_type.

Example Request

Example Response

Admin: Update

Update an existing FormField.

Definition

PUT /api/administration/forms/fields/{formField}

Route Parameters

Parameter
Type
Description

formField

integer

Form field ID.

Request Keys

Key
Type
Default
Description

form_field_type_id

string

Current value

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_id is optional. Supplying it assigns the field to that column and removes other column assignments. Omitting it preserves placement on update; layout_column_data alone does not change the placement.

  • When the field type is unchanged and config is omitted, validation reuses the current config.

  • When form_field_type_id changes and config is omitted, validation uses the new type's default_config. Submit config in 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

Parameter
Type
Description

formField

integer

Form field ID.

Example Request

Example Response

Last updated