Checkbox Field
The checkbox
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 | Data source for generating list of options. This can be a string or a function. If a string, it is considered to 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. | |
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. | |
multiple | boolean | Whether to render multiple checkboxes for multi-valued type (such as an array or a comma-delimited string) | |
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. | |
rightLabel | string | Optional right-hand side label for single checkbox field. | |
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
Example 2
Example 3
Example 4
Example 5
We also hook up some form buttons to get at the JSON. Click the "View JSON" button to see it.
Example 6
Example 7
with JSON schema v4.