multiselect
The <multiselect> tag to provide multiple-choice options for widgets.
Available attributes:
Attribute | Type | Mandatory | Description |
---|---|---|---|
canExcludeAll | Boolean | N | Set the value to true to make it possible to leave the field with no items selected. The default value is false. |
class | String | N | Specify the CSS class name defined in the CSS field of the widget. |
model | String | Y | Specify this attribute to connect the client controller data object. When the model data changes, it is automatically transferred to the data of the client controller. |
options | Array | N | Specify the available options by using the CodeMirror JSON formatting. The array must contain the database_value and display_value keys. The database_value key contains the value of the selected option, display_value – its title. You can put any number of options in the drop-down menu. The vertical scrolling appears if there are more than 6 options. |
isreadOnly | Boolean | N | Set the value to true to make the field read-only. The default value is false. |
style | String | N | Specify the display settings (size, font, color, and others) of the tag elements using the CSS syntax. |
values | String | N | Specify the default value for the field. |
Example:
multiselect
<multiselect
model="data.values"
canExcludeAll="true"
values='["1", "2"]'
options='[{"database_value":"1","display_value":"First"},{"database_value":"2","display_value":"Second"}]'
></multiselect>
The template above adds the following element to the page: