Compatibility with <input type="text" />

Deprecated in Select2 4.0. It is now encouraged to use the <select> tag instead.

In past versions of Select2, a <select> element could only be used with a limited subset of options. An <input type="hidden" /> was required instead, which did not allow for a graceful fallback for users who did not have JavaScript enabled. Select2 now supports the <select> element for all options, so it is no longer required to use <input /> elements with Select2.

Adapter
DataAdapter
Decorator
InputData