Skip to main content
Version: 1.21.3

multiselect

The <multiselect> tag to provide multiple-choice options for widgets.

Available attributes:

AttributeTypeMandatoryDescription
canExcludeAllBooleanNSet the value to true to make it possible to leave the field with no items selected. The default value is false.
classStringNSpecify the CSS class name defined in the CSS field of the widget.
modelStringYSpecify 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.
optionsArrayNSpecify 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.
isreadOnlyBooleanNSet the value to true to make the field read-only. The default value is false.
styleStringNSpecify the display settings (size, font, color, and others) of the tag elements using the CSS syntax.
valuesStringNSpecify 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: