Answers.Body: <p>As Coleman said, no, for adding fields, but we removed certain fields for our setup with jQuery so our users wouldn't mis-click.</p>
  
  <p>EDIT: I went back to look at the code, and I remembered that we tried removing the fields with simple jQuery .hide() or .remove(), but realized that the standard classes we were trying to use were used elsewhere so it did more damage than good. In trying to use something like a nth-child selector on the li, we ran into trouble as well, though I can't remember what exactly.</p>
  
  <p>We ended up going the custom tpl route by creating a copy of templates/CRM/common/navigation.js.tpl and placing it in our custom templates directory and commenting out of the "li"'s that we didn't want.  Beginning around line 40:</p>
  
  <pre><code>&lt;!-- &lt;li&gt;&lt;label class="crm-quickSearchField"&gt;&lt;input type="radio" data-tablename="cc" value="contact_id" name="quickSearchField"&gt;{ts}CiviCRM ID{/ts}&lt;/label&gt;&lt;/li&gt; --&gt;
  &lt;!-- &lt;li&gt;&lt;label class="crm-quickSearchField"&gt;&lt;input type="radio" data-tablename="cc" value="external_identifier" name="quickSearchField"&gt;{ts}External ID{/ts}&lt;/label&gt;&lt;/li&gt; --&gt;
  </code></pre>
  
  <p>Looking back at it now, it would have been better to slog through and find the right combination of selectors with jQuery.  Perhaps something like this:</p>
  
  <pre><code>CRM.$(function($) {
      $('#civicrm-menu #crm-qsearch ul li:nth-child(3)').hide();
  });
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-09T15:13:08.857Z
Answers.Text: This answer would be even better if you supplied example code for doing so :)
Answers.UserDisplayName: Coleman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-09T16:00:56.180Z
Answers.Text: @Allen Hutchinson if you could dig out that jquery and share here, I'm sure many would be interested in seeing it.
Answers.UserDisplayName: LunkRat
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-09T21:00:59.077Z
Answers.Text: Thanks Coleman and @LinkSwanson !  I edited my answer and put in some example code. Provided with a grain of salt. :)
Answers.UserDisplayName: Allen Hutchison
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-01T06:23:00.870Z
Answers.LastActivityDate: 2015-04-09T20:57:34.740Z
Answers.LastEditDate: 2015-04-09T20:57:34.740Z
Answers.UserDisplayName: Allen Hutchison
Answers.Body: <p>Since CiviCRM 5.8 this feature is in core. Before you could use this extension:</p>
  <p><a href="https://lab.civicrm.org/extensions/quicksearch" rel="nofollow noreferrer">https://lab.civicrm.org/extensions/quicksearch</a></p>
  <p>To manage it:</p>
  <pre><code>Menu Administer / Customize Data and Screens / Search Preferences
  
  /civicrm/admin/setting/search?reset=1
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-26T14:23:20.553Z
Answers.LastActivityDate: 2021-03-26T14:23:20.553Z
Answers.UserDisplayName: calbasi
Answers.Body: <p>The quick answer is "no."</p>
  
  <p>For some back-story, that feature was contributed (circa 4.3) by a volunteer from the community who was enough of a coder to be able to get it to work, but not really a CiviCRM architect. His implementation was done by hard-coding that list of fields directly into the template.</p>
  
  <p>The result of his good-faith effort is that:</p>
  
  <ul>
  <li>We have the feature (which IMO is a step up from previously not having it).</li>
  <li>It's not flexible or extensible.</li>
  </ul>
  
  <p>I've been thinking that it would be a great little project for someone to add a setting to the "display preferences" screen that would allow you to enable/disable fields from that list. Searchable custom fields could be included.</p>
  
  <p>If anyone is interested in taking this on, let me know in the comments and I'm more than happy to help you get started.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-20T15:07:36.873Z
Answers.Text: This looks like a functionality regression starting from 4.5. Previous to this version with a "simple" custom development using **hook_civicrm_contactListQuery** you were able to adapt quick search to your needs. In my case, filtering by a custom field.
  
  I will be looking a quick workaround to get this working again (maybe an extension, cause I need it for CiviCRM 4.5.x).
  Coleman any tip will be welcome. Tx
Answers.UserDisplayName: luciano_s
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-20T16:21:43.573Z
Answers.Text: @LucianoSpiegel the contents of that list has never been alterable via hooks, per my answer above. But if you want to modify the behavior of the query, see [this answer](http://civicrm.stackexchange.com/questions/4011/is-there-a-recommended-way-to-customise-the-quicksearch/4015#4015).
Answers.UserDisplayName: Coleman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-31T14:14:12.103Z
Answers.Text: Great, thank you. I actually scanned the "display preferences" page over and over in vein looking for some checkboxes for the search dropdown. Your answer at least lets me know it's not there (but that I should consider implementing it).
Answers.UserDisplayName: LunkRat
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-30T21:36:46.903Z
Answers.LastActivityDate: 2015-04-09T15:12:39.807Z
Answers.LastEditDate: 2015-04-09T15:12:39.807Z
Answers.UserDisplayName: Coleman
Body: <p>In the CiviCRM global menu there is a nice search box on the left. This box allows for targeting specific fields via radio buttons in a dropdown, like this:</p>
  
  <p><img src="https://i.sstatic.net/moU5a.png" alt="CiviCRM global menu search box"></p>
  
  <p>Is it possible to remove or change the fields that appear here?</p>
  
  <p>Can custom contact fields be added to these options?</p>
  
Tags: <search><global-menu>
Title: How to add/remove search fields from the search box dropdown in the navbar?
ThreadText: # How to add/remove search fields from the search box dropdown in the navbar?
  
  (Asked by: username_0 on 2015-03-30)
  
  In the CiviCRM global menu there is a nice search box on the left. This box allows for targeting specific fields via radio buttons in a dropdown, like this:
  
  ![CiviCRM global menu search box](https://i.sstatic.net/moU5a.png)
  
  Is it possible to remove or change the fields that appear here?
  
  Can custom contact fields be added to these options?
  
  **Tags:** search, global-menu
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_2 on 2015-03-30. Score: 7 | Accepted answer
  
  The quick answer is "no."
  
  For some back-story, that feature was contributed (circa 4.3) by a volunteer from the community who was enough of a coder to be able to get it to work, but not really a CiviCRM architect. His implementation was done by hard-coding that list of fields directly into the template.
  
  The result of his good-faith effort is that:
  
  * We have the feature (which IMO is a step up from previously not having it).
  * It's not flexible or extensible.
  
  I've been thinking that it would be a great little project for someone to add a setting to the "display preferences" screen that would allow you to enable/disable fields from that list. Searchable custom fields could be included.
  
  If anyone is interested in taking this on, let me know in the comments and I'm more than happy to help you get started.
  
  > **Comments:**
  > **username_0**: Great, thank you. I actually scanned the "display preferences" page over and over in vein looking for some checkboxes for the search dropdown. Your answer at least lets me know it's not there (but that I should consider implementing it).  
  > **username_4**: This looks like a functionality regression starting from 4.5. Previous to this version with a "simple" custom development using **hook_civicrm_contactListQuery** you were able to adapt quick search to your needs. In my case, filtering by a custom field.  I will be looking a quick workaround to get this working again (maybe an extension, cause I need it for CiviCRM 4.5.x). username_2 any tip will be welcome. Tx  
  > **username_2**: @LucianoSpiegel the contents of that list has never been alterable via hooks, per my answer above. But if you want to modify the behavior of the query, see [this answer](http://civicrm.stackexchange.com/questions/4011/is-there-a-recommended-way-to-customise-the-quicksearch/4015#4015).  
  
  ---
  
  ### Answer by username_1 on 2015-04-01. Score: 6
  
  As username_2 said, no, for adding fields, but we removed certain fields for our setup with jQuery so our users wouldn't mis-click.
  
  EDIT: I went back to look at the code, and I remembered that we tried removing the fields with simple jQuery .hide() or .remove(), but realized that the standard classes we were trying to use were used elsewhere so it did more damage than good. In trying to use something like a nth-child selector on the li, we ran into trouble as well, though I can't remember what exactly.
  
  We ended up going the custom tpl route by creating a copy of templates/CRM/common/navigation.js.tpl and placing it in our custom templates directory and commenting out of the "li"'s that we didn't want. Beginning around line 40:
  
  ```
  <!-- <li><label class="crm-quickSearchField"><input type="radio" data-tablename="cc" value="contact_id" name="quickSearchField">{ts}CiviCRM ID{/ts}</label></li> -->
  <!-- <li><label class="crm-quickSearchField"><input type="radio" data-tablename="cc" value="external_identifier" name="quickSearchField">{ts}External ID{/ts}</label></li> -->
  
  ```
  
  Looking back at it now, it would have been better to slog through and find the right combination of selectors with jQuery. Perhaps something like this:
  
  ```
  CRM.$(function($) {
      $('#civicrm-menu #crm-qsearch ul li:nth-child(3)').hide();
  });
  
  ```
  
  > **Comments:**
  > **username_2**: This answer would be even better if you supplied example code for doing so :)  
  > **username_0**: @username_1 Hutchinson if you could dig out that jquery and share here, I'm sure many would be interested in seeing it.  
  > **username_1**: Thanks username_2 and @LinkSwanson !  I edited my answer and put in some example code. Provided with a grain of salt. :)  
  
  ---
  
  ### Answer by username_3 on 2021-03-26. Score: 4
  
  Since CiviCRM 5.8 this feature is in core. Before you could use this extension:
  
  <https://lab.civicrm.org/extensions/quicksearch>
  
  To manage it:
  
  ```
  Menu Administer / Customize Data and Screens / Search Preferences
  
  /civicrm/admin/setting/search?reset=1
  
  ```
  
  
  ---
  
  