Configuration reference
Every setting of the Field Item Relationship fieldtype (type: field_item_relationship), in the order the blueprint editor shows them. Common Statamic field settings (display, instructions, localizable, validate, if…) work as usual.


Source
| Setting | YAML key | Type | Default | Shown when |
|---|---|---|---|---|
| Source type | source_type | sibling_or_ancestor | global | sibling_or_ancestor | always |
| Source global set | source_global_set | global set handle | none | source_type is global |
| Source field | source_field | field handle | none | always |
Source type: where the source field is. Sibling or ancestor looks in the same blueprint, starting with the field's own Grid row or Replicator set and walking up to the top level. Global reads a field of a Global set. See Sources.
Source global set: the global set that holds the source field. Older configs that use the key source_global are still read.
Source field: the handle of the field to take items from. Any field that stores a list or a keyed object: List, Grid, Replicator, Assets, Array, Checkboxes…
Options
| Setting | YAML key | Type | Default | Shown when |
|---|---|---|---|---|
| Option label source | option_label_source | key, dot path or `template` | none | always |
| Option image source | option_image_source | key / dot path | none | always |
| Save as | save_as | key | value | index | id | object_key | object | none (required) | always |
| Object key | object_key | key / dot path | none | save_as is object_key or object |
Option label source: for object items, the key to use as the option label. Dot notation works for nested keys. For advanced labels, use a string literal in back ticks, where o is the item: `${o.name} (${o.role})`.
Option image source: for object items (Grid rows, Replicator sets) that contain an Assets field, that field's handle. It is used for thumbnails in the image grid and the dropdown. Not needed when the source itself is an Assets field.
Save as: what is stored when an item is picked. The allowed modes depend on the source data, see Save as modes. For Assets sources, use value (the asset ID).
Object key: the key that object_key saves, and that object uses to find the row again.
Selection
| Setting | YAML key | Type | Default | Shown when |
|---|---|---|---|---|
| Allow multiple | multiple | boolean | false | always |
| Max items | max_items | integer ≥ 1 | none (no limit) | multiple is true |
| Input type | input_type | select | radio | button_group | image_grid | select | always |
| Inline | inline | boolean | false | input_type is radio |
| Columns | columns | integer ≥ 1 | 4 | input_type is image_grid |
| Aspect ratio | aspect_ratio | 1/1 | 4/3 | 3/2 | 16/9 | 3/4 | 4/3 | input_type is image_grid |
| Show labels | show_labels | boolean | true | input_type is image_grid |
Allow multiple: allow selecting more than one item. The value is saved as a list.
Max items: the maximum number of items that can be selected.
Input type: how the options are presented. Radio buttons become checkboxes when multiple selections are allowed. The image grid shows thumbnails for Assets sources, or when an option image source is set. See Input types.
Inline: show the radio buttons or checkboxes next to each other.
Columns, Aspect ratio, Show labels: image grid layout. Show labels shows the option label (or file name) under each image.
Complete example
A field with every option set (values from the testbench demos):
- handle: office
field:
type: field_item_relationship
display: Office
instructions: Where does this person work?
localizable: true
# Source
source_type: global
source_global_set: demo_settings
source_field: offices
# Options
option_label_source: '`${o.city}, ${o.country}`'
option_image_source: photo
save_as: object_key
object_key: city
# Selection
multiple: false
input_type: image_grid
columns: 3
aspect_ratio: 3/2
show_labels: trueSaved values
| Configuration | Stored in the content file |
|---|---|
| single | a scalar (or an object for save_as: object) |
multiple: true | a list |
An empty selection is saved as null, not as an empty string or an empty list.