Chooser Field

The chooser field.

Properties

Title Checkbox
Description Checkbox Field for boolean (true/false), string ('true', 'false' or comma-delimited string of values) or data array.
Field Type checkbox
Base Field Type list

Schema

Property Type Default Description
enum array List of field value options

Options

Property Type Default Description
dataSource string Datasource for generating list of options. This can be a string or a function. If a string, it is considered S be a URI to a service that produces a object containing key/value pairs or an array of elements of structure {'text': '', 'value': ''}. This can also be a function that is called to produce the same list.
height number Specify a fixed height for the list boxes. If not provided, the list boxes size to the amount of data.
hideNone boolean Whether to hide the None option from a list (select, radio or otherwise). This will be true if the field is required and false otherwise.
join function For multiple select lists. Defines a f(a) for how selected options should be combined into a single string. A split function should also be defined which reverses this function.
name string Field Name.
noneLabel string None The label to use for the 'None' option in a list (select, radio or otherwise).
removeDefaultNone boolean If true, the default 'None' option will not be shown.
showAllSelections boolean When true, show full selection list and disable anything already selected
sort function Defines an f(a,b) sort function for the array of enumerated values [{text, value}]. This is used to sort enum and optionLabels as well as results that come back from any data sources (for select and radio controls). By default the items are sorted alphabetically. Don't apply any sorting if false.
split function For multiple select lists. Defines a f(a) for how data strings should be split into individual values. A join function should also be defined which reverses this function.
useDataSourceAsEnum boolean true Whether to constrain the field's schema enum property to the values that come back from the data source.

Example 1

{% raw %} {% endraw %}

Example 2

{% raw %} {% endraw %}

Example 3

Selected values are grayed out (or disabled).

{% raw %} {% endraw %}

Example 4

will use. This introduces scroll bars for selecting values.

{% raw %} {% endraw %}

Example 5

{% raw %} {% endraw %}

Example 6

{% raw %} {% endraw %}

Example 7

{% raw %} {% endraw %}

Example 8

{% raw %} {% endraw %}

Example 9

{% raw %} {% endraw %}