Autocomplete
11/19/26Less than 1 minute
Autocomplete
Autocomplete with optional free-text and create. Three option shapes are supported β supply exactly one of options, uri, or resource.
Inline options array:
"fieldInput": {
"type": "autocomplete",
"options": {
"options": [{ "label": "Active", "value": "active" }],
"labelKey": "label",
"valueKey": "value"
}
}Remote endpoint:
"fieldInput": {
"type": "autocomplete",
"options": {
"uri": "/api/authors",
"dataField": "data",
"labelKey": "name",
"valueKey": "id"
}
}Resource reference:
"fieldInput": {
"type": "autocomplete",
"options": {
"resource": "./author.resource",
"labelKey": "name",
"valueKey": "id"
}
}Excluding already-selected values
Use exclude to hide values the user already chose β useful for many-to-many chip lists or sibling field constraints.
"fieldInput": {
"type": "autocomplete",
"options": {
"resource": "./author.resource",
"labelKey": "name",
"valueKey": "id",
"exclude": {
"values": "{form.coAuthors}", // {form.path} placeholder or a literal array
"key": "id", // filter field β defaults to valueKey
"selected": true // also exclude this field's own current value
}
}
}valuesβ a{form.path}placeholder (resolved at fetch time) or a literalunknown[]. Objects in the array are mapped throughvalueKeyto extract the scalar.keyβ the server-side field used for thenot_infilter. Defaults tovalueKey(or"id").selectedβ whentrue, the control's own current value is also excluded. Automatically applied byRelationInlinefor many-to-many chips.
For resource-backed autocomplete the exclude list is sent as a filter=<key>:[β¦]:not_in query param (skipped above 200 values). For remote URIs, add {exclude} to the URI template. Client-side filtering always runs as a fallback.
Used by: autocomplete
Also available: all common options.
Inline autocomplete
| Option | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
labelKey | string | No | Object key used as the display label in the dropdown | "label", "name" | |
valueKey | string | No | Object key used as the stored value | "value", "id" | |
freeText | boolean | No | Allow the user to type a value not in the options list | ||
enableCreate | boolean | No | Show a "create" action when no matching option is found | ||
storeValue | boolean | No | Store option[valueKey] instead of the whole option object | ||
exclude | object | No | Exclude already-selected values from the lookup results | ||
options | any[] | Yes | Inline array of option items | [{"label":"Active","value":"active"}] | |
values | any[] | No | Alias for options (deprecated β prefer options) |
Remote autocomplete
| Option | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
labelKey | string | No | Object key used as the display label in the dropdown | "label", "name" | |
valueKey | string | No | Object key used as the stored value | "value", "id" | |
freeText | boolean | No | Allow the user to type a value not in the options list | ||
enableCreate | boolean | No | Show a "create" action when no matching option is found | ||
storeValue | boolean | No | Store option[valueKey] instead of the whole option object | ||
exclude | object | No | Exclude already-selected values from the lookup results | ||
uri | string | Yes | Remote endpoint URL that returns option items | "/api/authors" | |
dataField | string | No | Field in the API response containing the data array | "data", "results" | |
skipAuth | boolean | No | Send the request without authentication headers |
Resource autocomplete
| Option | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
labelKey | string | No | Object key used as the display label in the dropdown | "label", "name" | |
valueKey | string | No | Object key used as the stored value | "value", "id" | |
freeText | boolean | No | Allow the user to type a value not in the options list | ||
enableCreate | boolean | No | Show a "create" action when no matching option is found | ||
storeValue | boolean | No | Store option[valueKey] instead of the whole option object | ||
exclude | object | No | Exclude already-selected values from the lookup results | ||
resource | string | Yes | Relative path to a resource.json used to populate the options | "./author.resource.json" | |
skipAuth | boolean | No | Send the request without authentication headers | ||
dataField | string | No | Field in the API response containing the data array | "data", "results" |