Select2 is a jQuery-based replacement for select boxes. It supports searching, remote data sets, and pagination of results.
Basic
Select2 was designed to be a replacement for the standard <select>
box that is displayed by the browser. By default it supports all options and operations that are available in a standard select box, but with added flexibility.
Multiple Selection
Select2 also supports multi-value select boxes.
Limiting the number of selections
Select2 multi-value select boxes can set restrictions regarding the maximum number of options that can be selected.
Automatic tokenization
Select2 supports ability to add choices automatically as the user is typing into the search field. Try typing in the search field below and entering a space or a comma.
Loading array data
You may use the data configuration option to load dropdown options from a local array.