Answers.Body: <p>In general, a field can be made into select2 simply by adding the css class "crm-select2" to it.</p>
  
  <p><a href="https://github.com/civicrm/civicrm-core/pull/9603" rel="nofollow noreferrer">Here is a PR</a> to add it to the existing location field you mentioned. Please try it out and leave a comment on the PR to say you've tested it and how it works for you - that will speed along the review process and we'll be able to get that merged into the next release of CiviCRM.</p>
  
  <p>Search builder is kinda it's own thing. Changing it to use select2 is certainly possible but would take some doing, you'd need to alter the javascript code somewhat.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-02T02:20:39.583Z
Answers.Text: Easy! I'll look at that tomorrow
Answers.UserDisplayName: Ken West
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-02T06:17:41.183Z
Answers.Text: Actually, I did that today! Nice work!
Answers.UserDisplayName: Ken West
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-01T01:12:24.733Z
Answers.LastActivityDate: 2017-01-01T03:34:34.330Z
Answers.LastEditDate: 2017-01-01T03:34:34.330Z
Answers.UserDisplayName: Coleman
Body: <p>Examples ...</p>
  
  <ul>
  <li>Create event - add location - it's hard to find locations with the existing dropdown</li>
  <li>Search builder - Contact Tag(s) IN - dropdown gets hard to use with many tags</li>
  </ul>
  
  <p>I'd be happy to supply patches for these but I'm not happy I understand the scope of such a change.</p>
  
  <p>Is there a PR that shows how this should be done? A good example of a field being changed to select2?</p>
  
Tags: <core>
Title: Is there a recipe for converting fields to select2?
ThreadText: # Is there a recipe for converting fields to select2?
  
  (Asked by: username_0 on 2016-12-30)
  
  Examples ...
  
  * Create event - add location - it's hard to find locations with the existing dropdown
  * Search builder - Contact Tag(s) IN - dropdown gets hard to use with many tags
  
  I'd be happy to supply patches for these but I'm not happy I understand the scope of such a change.
  
  Is there a PR that shows how this should be done? A good example of a field being changed to select2?
  
  **Tags:** core
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-01-01. Score: 3
  
  In general, a field can be made into select2 simply by adding the css class "crm-select2" to it.
  
  [Here is a PR](https://github.com/civicrm/civicrm-core/pull/9603) to add it to the existing location field you mentioned. Please try it out and leave a comment on the PR to say you've tested it and how it works for you - that will speed along the review process and we'll be able to get that merged into the next release of CiviCRM.
  
  Search builder is kinda it's own thing. Changing it to use select2 is certainly possible but would take some doing, you'd need to alter the javascript code somewhat.
  
  > **Comments:**
  > **username_0**: Easy! I'll look at that tomorrow  
  > **username_0**: Actually, I did that today! Nice work!  
  
  ---
  
  