CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Customizing Quick Search box
Pages: [1]

Author Topic: Customizing Quick Search box  (Read 842 times)

zutroyquixote

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
  • CiviCRM version: 3.3.2
  • CMS version: Joomla 1.5.23
  • MySQL version: 5.2.3
  • PHP version: 5.2.16
Customizing Quick Search box
August 10, 2010, 06:55:54 pm
I have looked in the wikis and forums thinking I might find the answer to this with no luck.  I would like extend the Quick Search to be able search by an id number in addition to name/email.

I am still familiarizing myself with the structure of the code in Civi and can't figure out how and where I could customize the quick search.  Consider a custom field that is a unique identifier for some members (or for simplicity consider the id column of the contact table).  How might the Quick Search be extended so that a user could type in an id number and retrieve the matching record?  I believe there is a json query to get the matches but I don't have a grasp on how complex a customization this would be if it is worth tackling at all.

Thoughts?

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Customizing Quick Search box
August 10, 2010, 07:08:51 pm
you can do it with a hook:
http://wiki.civicrm.org/confluence/display/CRMDOC32/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmcontactListQuery

use $context=='navigation'
to isolate that instance of the contact search field
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

zutroyquixote

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
  • CiviCRM version: 3.3.2
  • CMS version: Joomla 1.5.23
  • MySQL version: 5.2.3
  • PHP version: 5.2.16
Re: Customizing Quick Search box
August 10, 2010, 08:21:17 pm
Brilliant!  Thanks for the lead on the $context param!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Customizing Quick Search box

This forum was archived on 2017-11-26.