Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8625221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:43:45+00:00 2026-06-12T07:43:45+00:00

On github it says that the search box was now optional in the chosen

  • 0

On github it says that the search box was now optional in the chosen select boxes. Does anyone know how to remove it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T07:43:46+00:00Added an answer on June 12, 2026 at 7:43 am

    The current version of Chosen provides two methods to control the display of the search box. Both are passed in as options during initialization. To hide the search box completely pass in the option "disable_search": true:

    $("#mySelect").chosen({
      "disable_search": true
    });
    

    Alternatively, if you want to show the search iff there are a certain number of options, use the option "disable_search_threshold": numberOfOptions (where numberOfOptions is the minimum number of options required before showing the search box):

    $("#mySelect").chosen({
      "disable_search_threshold": 4
    });
    
    jQuery(function($) {
      // Create a set of OPTION elements from some dummy data
      var words = ["lorem", "ipsum", "dolor", "sit", "amet,", "consectetur", "adipiscing", "elit", "duis", "ullamcorper", "diam", "sed", "lorem", "mattis", "tristique", "integer", "pharetra", "sed", "tortor"],
          options = $($.map(words, function(word) {
            return $(document.createElement('option')).text(word)[0];
          }));
      $('select').each(function() {
        // Add the dummy OPTIONs to the SELECT
        var select = $(this).append(options.clone());
        // Initialize Chosen, using the options from the
        // `data-chosen-options` attribute
        select.chosen(select.data('chosen-options'));
      });
    });
    body {
      font-family: sans-serif;
      font-size: .8em; }
    label {
      display: block;
      margin-bottom: 1.4em; }
      label .label {
        font-weight: bold;
        margin-bottom: .2em; }
    select {
      width: 14em; }
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/chosen/1.5.1/chosen.min.css" rel="stylesheet"/>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/chosen/1.5.1/chosen.jquery.min.js"></script>
    
    <label>
      <div class='label'>Default behavior</div>
      <select name='default' data-chosen-options='{}'></select>
    </label>
    <label>
      <div class='label'>No search at all</div>
      <select name='no-search' data-chosen-options='{ "disable_search": true }'></select>
    </label>
    <label>
      <div class='label'>Search iff more than 4 items</div>
      <select name='conditional-search' data-chosen-options='{ "disable_search_threshold": 4 }'></select>
    </label>
    <label>
      <div class='label'>Search iff more than 32 items</div>
      <select name='conditional-search' data-chosen-options='{ "disable_search_threshold": 32 }'></select>
    </label>
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

github url I am using a simple search that displays search results: @adds =
I have a private repository in github that has 5 collaborators.Now when the collaborators
I am getting an error that says: 'object' does not contain a definition for
I noticed that if I do something like: script/plugin install git://github.com/plug-xyz.git It says it
I know that the C++ standard says (sec 9.4.2 paragraph 4) that a static
When I login github with my gmail address, it says That account is an
According to the documentation here: https://github.com/playframework/Play20/wiki/AssetsGoogleClosureCompiler it says: Any JavaScript file present in app/assets
At minute 4 of pry 's introductory screencast http://pry.github.com/ Josh Cheek says to run
The website says it is for .NET 4.0 but that I could compile it
I'm reading about using git as an svn client here: http://learn.github.com/p/git-svn.html That page suggests

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.