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

DefaultValueSources

Introduction

DefaultValueSources resolve prefilled values for FormFields.

Model Definition

Alias

defaultValueSource

Relations

Key
Relation
Type
Relation Field(s)

formField

Belongs to

form_field_id

sourceEntity

FormField or another supported entity

Morph to

source_entity_type, source_entity_id

Resolve Form Default Values

Resolve default values for all fields of one Form.

Definition

GET /api/forms/{form}/default-values

Route Parameters

Parameter
Type
Description

form

integer

Form ID.

Behavior

  • Sources are evaluated by ascending sort_number per field; equal positions use ascending source ID. The first successfully resolved, non-empty value wins. Failed sources and sources returning null or an empty string are skipped; the string "0" is a usable value.

  • For a formFieldValue source, empty raw input is skipped even when its displayed value contains a placeholder. Description fields use their displayed content instead because they have no raw input.

  • Response keys are form field IDs. A field with no usable source is omitted. Field-value sources return value, request_value, and additional_information; system-variable sources return value only.

Example Request

Example Response

Admin: List Source Form Fields

List accessible source FormFields from administrable Forms and TaskTemplates for a field-value default source.

Definition

POST /api/administration/forms/fields/default-value-sources/form-field-value/form-fields

Request Keys

Key
Type
Default
Description

page

integer

1

Result page.

per_page

integer

Server default

Results per page.

filter

object

No filters

Filters applied to available source fields.

Behavior

  • Fields are returned only when the authenticated user can administer their parent Form or TaskTemplate.

  • Each preview uses the field name as title, the localized parent type as sub_title, and the parent title as description.

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

Example Request

Example Response

Admin: List Source Field Filters

List filters for accessible source FormFields.

Definition

POST /api/administration/forms/fields/default-value-sources/form-field-value/form-fields/filters

Request Keys

Key
Type
Default
Description

page

integer

1

Result page.

per_page

integer

Server default

Results per page.

filter

object

No filters

Filters applied to available source fields.

Example Request

Example Response

Admin: List Source Field Filter Options

List options for one source-field filter.

Definition

POST /api/administration/forms/fields/default-value-sources/form-field-value/form-fields/filters/{filterKey}/options

Route Parameters

Parameter
Type
Description

filterKey

string

Multi-select filter key.

Request Keys

Key
Type
Default
Description

page

integer

1

Result page.

per_page

integer

Server default

Results per page.

filter

object

No filters

Filters applied before option aggregation.

Behavior

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

Example Request

Example Response

Admin: Create

Create a new DefaultValueSource.

Definition

POST /api/administration/forms/fields/default-value-sources

Request Keys

Key
Type
Default
Description

source_type*

string

-

formFieldValue or systemVariable.

form_field_id*

integer

-

Target FormField ID.

config

object

Type default

Source-specific configuration.

source_entity_type

string | null

null

Source morph alias, normally formField for formFieldValue.

source_entity_id

integer | null

null

Source entity ID; required with source_entity_type.

sort_number

integer

Auto

Evaluation order within the target field.

Keys with * are required.

Behavior

For systemVariable, config.variable_key is required and config.variable_filter may contain a formatter. For formFieldValue, identify the source field through the morph keys.

Example Request

Example Response

Admin: Update

Update an existing DefaultValueSource.

Definition

PUT /api/administration/forms/fields/default-value-sources/{defaultValueSource}

Route Parameters

Parameter
Type
Description

defaultValueSource

integer

Source ID.

Request Keys

Key
Type
Default
Description

source_type

string

Current value

New source type.

form_field_id

integer

Current value

New target field ID.

config

object

Current or type default

Source-specific configuration.

source_entity_type

string | null

Current value

New source morph alias.

source_entity_id

integer | null

Current value

New source entity ID.

sort_number

integer

Current value

Evaluation order.

Behavior

When source_type changes and config is omitted, the new type's default configuration is used.

Example Request

Example Response

Admin: Delete

Delete an existing DefaultValueSource.

Definition

DELETE /api/administration/forms/fields/default-value-sources/{defaultValueSource}

Route Parameters

Parameter
Type
Description

defaultValueSource

integer

Source ID.

Example Request

Example Response

Last updated