Select2 also supports multi-value select boxes. The select below is declared with the
.select2 class for basic select2 control. Use
multiple="multiple" attribute for multiple select box
Select2 will respond to the
disabled attribute on
<select> elements. You can also initialize Select2 with
disabled: true to get the same effect
Select2 multi-value select boxes can set restrictions regarding the maximum number of options selected. The select below is declared with the
multiple attribute with
maximumSelectionLength in the select2 options.
Use data attribute
data-icon to add icon name for each options. And use class
.js-select2-icons to set icon with option.