Page 1 of 1

How to always display Search textbox on Select2 control (v2023)

Posted: Tue Jan 24, 2023 8:47 am
by mobhar

This following trick will show you how to always display the Search textbox on Select2 control.

  1. Enable Requires search option under Fields setup -> Edit Tag pane -> choose Select -> SELECT Tag.

  2. Put this following code in Server Events -> Global -> All Pages -> Page_Head:

    <script>
      ew.selectMinimumInputLength = 0; // Minimum number of characters required to start a search
      ew.selectOptions.minimumResultsForSearch = 0; // Minimum number of results required to display the search box
    </script>
  3. Re-generate ALL the script files again, and enjoy the result.


Re: How to always display Search textbox on Select2 control (v2023)

Posted: Thu Jan 26, 2023 1:52 pm
by kallul555

Thank you very much .