⚠ In case you've missed it we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This forum is read-only and soon will be archived. ⚠


Search containing string in chosen / multiple select dropdown list

chosen multiselect multiple select fulltext in string contains

  • Please log in to reply
2 replies to this topic

#1 DerRobert

DerRobert

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 11 January 2018 - 10:04 AM

Hi to all,

 

I have created a n_n relation and the jquery chosen plugin works very fine. I just experienced that when using the search field of the dropdown I only can search strings that start with the provided search string, but nothing that also contains the search string.

 

Is there a way to change this behaviour or is this a limitation of chosen.js ?

 

Thanks to all!

-Rob



#2 jmcastro2004

jmcastro2004

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 23 July 2020 - 09:33 PM

Set search_contains: true into

/assets/grocery_crud/js/jquery_plugins/config/jquery.chosen.config.js

 

$(function(){
    $(".chosen-select,.chosen-multiple-select").chosen({allow_single_deselect:true});
});

 

to

 

$(function(){
    $(".chosen-select,.chosen-multiple-select").chosen({allow_single_deselect:true, search_contains: true});    
});



#3 emmajoe

emmajoe

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 15 October 2020 - 01:47 AM

A search box is added to the top of the dropdown automatically for select boxes where only a single option can be selected. The behavior and appearance of the search box can be easily customized with Select2. You can try it. word to pdf







Also tagged with one or more of these keywords: chosen, multiselect, multiple select, fulltext, in string, contains

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users