Relation

Relation field, linking to another collection entry.

Usage

{{ partial "admin/widgets/relation.js" $args }}

Parameters

ParameterTypeRequiredDescription
labelstringyesField label
namestringyesField name
collectionstringyesTarget collection name
value_fieldstringyesField used as the stored value
display_fieldsarraynoFields shown in the picker
dropdown_thresholdnumbernoUp to this number of options, Sveltia CMS shows radio buttons or checkboxes instead of a dropdown (default: 1)
filtersarraynoFilter entries by field values
hiddenbooleannoHide from the editor
hintstringnoHelp text
i18nboolean or stringnoi18n mode
label_singularstringnoSingular label
multiplebooleannoAllow multiple relations (default: true)
nameOverridestringnoOverride the name in output
requiredbooleannoMark as required
search_fieldsarraynoFields to search in the picker