## Configuration

### Value Lists

By default, value lists for selection fields are managed through resource bundle documents in the [Content Application](🔗).

To create a resource bundle document:

  1. Open the _Content_ application.

  2. Browse to a folder, or create a new one, for example **myproject/administration**.

  3. Add a new document, choose document type "Resource Bundle".

  4. Enter a unique value in the _ID_ field.

  5. In the new Resource Bundle document enter a _key_ and a _label_ for each value.

  6. Save and publish the document.



### Add a Selection Field to a Content Type

The following field types are available in the [Content Type Editor](🔗):

**Static Dropdown**

A single value dropdown widget populated from a static value list specified as comma-separated values in the field properties.



The values are specified in the _selectable.options_ property.

Each option can be a key/label pair, delimited by the first '='. 



If no key/label pair delimiter ('=') is found, the key value is used for the label as well.



**Dynamic Dropdown**

A single value dropdown widget populated from a resource bundle document.



The resource bundle document containing the key-value pairs to populate the dropdown is referred by its ID in the _source_ property, for example:





Other field properties available in the right column are optional. A full list is provided below.

Column Title
Column Title
Column Title
sourceA String property used to refer to the ID of a Resource Bundle document containing the key-value pairs to populate the dropdown.
sortComparatorAn optional fully qualified class name of an implementation of org.onehippo.forge.selection.frontend.plugin.sorting.IListItemComparator. <br>A standard implementation is org.onehippo.forge.selection.frontend.plugin.sorting.DefaultListItemComparator that sorts alphanumerically.
sortOrderOptional. Either 'ascending' or 'descending', defaults to 'ascending'.
sortByOptional. Either 'key' or 'label', defaults to 'label'.
showDefaultUsed by org.onehippo.forge.selection.frontend.plugin.DynamicDropdownPlugin and defines whether the default value "Choose One" should be shown.
observableIdA optional, user defined observable id. If this id is provided, the dropdown creates a service in the background, containing an observable model of it's value. <br>The id should be unique per document editor instance by prefixing it with ${cluster.id}.
observerIdA optional, user defined observer id that should match another dropdown's observableId (including the ${cluster.id}). The observer dropdown will start listening for changes on the observable dropdown's model and will use that value to get a value list to redraw itself.
nameProviderFully qualified class name of an implementation of org.onehippo.forge.selection.frontend.provider.IValueListNameProvider that will turn a given (observed) value into a value list name (i.e. path or uuid). <br>The resulting name will be used to get the value list from the configured value list provider service. When missing, the BasePathNameProvider is used. <br> <br>Standard implementations are: <br>org.onehippo.forge.selection.frontend.provider.BasePathNameProvider (the default):  <br>concatenates sourceBasePath plus the observed value. This requires that the value list item keys of the observable dropdown's value list match the node names of the chained value lists. <br>org.onehippo.forge.selection.frontend.provider.ConfiguredNameProvider:  <br>looks up value list names in the configuration, using as key: 'source.' + (observed value). <br>org.onehippo.forge.selection.frontend.provider.NOOPNameProvider: no look up: just returns the observed value as value list name, useful in combination with a custom value list provider.
sourceBasePathUsed by org.onehippo.forge.selection.frontend.provider.BasePathNameProvider and defines the absolute base path where dependent value list documents are located.

**Radio Group**

A radio button group widget populated from a resource bundle document.



The resource bundle document containing the key-value pairs to populate the radio group is referred by its ID in the _source_ property, for example:



Other field properties are optional. A full list is provided below.

Column Title
Column Title
sourceA String property used to refer to the ID of a Resource Bundle document containing the key-value pairs to populate the radio group.
sortComparatorAn optional, fully qualified class name of an implementation of org.onehippo.forge.selection.frontend.plugin.sorting.IListItemComparator. <br>A standard implementation is org.onehippo.forge.selection.frontend.plugin.sorting.DefaultListItemComparator that sorts alphanumerically.
sortOrderOptional. Either 'ascending' or 'descending', defaults to 'ascending'.
sortByOptional. Either 'key' or 'label', defaults to 'label'.
orientationOptional. Either 'vertical' or 'horizontal', defaults to 'vertical'.

**Boolean Radio Group**

A boolean value radio button group widget. The labels for true and false can be populated from a resource bundle document.



The resource bundle document is referred by its ID in the _source_ property, for example:



All field properties are optional. A full list is provided below.

Column Title
Column Title
sourceA String property used to refer to the ID of a Resource Bundle document from which two keys are read: "true" and "false". Other and duplicate entries are ignored. If not found, the default labels "true" and "false" are used.
orientationOptional. Either 'vertical' or 'horizontal', defaults to 'vertical'.
trueLabel🚧This property is deprecated. Use a resource bundle document specified in the source property instead.<br><br>String property to override the default 'true' label.
falseLabel🚧This property is deprecated. Use a resource bundle document specified in the source property instead.<br><br>String property to override the default 'false' label.