Page tree
Skip to end of metadata
Go to start of metadata

The select, option group and twin-column fields share this general configuration pattern, but they also have their own additional properties.

<field name>

required

Name of the field.

options

optional

Parent node for the selectable options. If not set, the field generates options from the repository path.

<option name>

Name of the option.

value

required

Value saved to the repository when selected.

name

optional, default is the parent node name

Name of the node where the selected value is stored. If not set, the name of the parent node is used.

label

optional

Option label displayed to the user.

iconSrc

optional

Displays an image next to the option. Value is a path to the image.

selected

optional, default is false

Pre-selects the option.

labelProperty

optional, default is label

Reads option labels from a different property. Set to the name of your custom label node.

path

optional

Path to existing options as opposed to defining options in the current definition. Only valid with a field defined in XML.

Alternatively, option definitions can be placed in a YAML file referenced via include.

repository

optional, default is RepositoryConstants.CONFIG

When using a path to existing options, workspace to look in.

sortOptions

optional, default is true

By default, option labels are sorted alphabetically. When false, sorts the options by JCR node order.

comparatorClass

optional, default is info.magnolia.ui.form.field.factory.SelectFieldFactory.DefaultOptionComparator

When sortOptions set to true, sorts the available options.

valueProperty

optional, default is value

Reads option values from a different property. Set to the name of your custom value node.