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

Tips submitted by PHPMaker users
Post Reply
mobhar
User
Posts: 10852

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

Post 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:

    Code: Select all

    <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.


kallul555
User
Posts: 1

Post by kallul555 »

Thank you very much .


Post Reply