Hello team,
I’m using ACF front-end form in which I have multiple select2 fields( ACF default,ajax search enabled ).
What I want to achieve is whenever I search for any string, It should appear by starting character. So if I’m start searching with letter “M” them options starting with letter “M” should appear but currently it shows all the options having letter “M” anywhere in full string.
There is an example of searching by the beginning of strings here https://stackoverflow.com/questions/31571864/select2-search-match-only-words-that-start-with-search-term
You would need to add custom JS to your site and to something like that. Sorry, I don’t know the exact details or code to add this to an ACF field.