[development] Autocomplete For A "Select" Widget

Rob Thorne rob at torenware.com
Fri May 19 16:01:00 UTC 2006


I'm looking at using autocomplete for contacts stored in CiviCRM.  
Implementing basic autocomplete using the standard Drupal hook was 
pretty simple: just search the CRM store for a contacts "display name" 
via the autocomplete handler.

But there's a problem with how the standard handler works:  display 
names are not unique.  What I probably *need* to do is this:  use the 
autocomplete field to populate a "select" widget that uses the display 
name as the label, and the unique numerical contact_id as the key.

Before I start looking into implementing this myself:  have any of you 
implemented this kind of widget?  Or do you have advice how best to do this?

Thanks,
Rob

Rob Thorne
Torenware Networks
http://www.torenware.com


More information about the development mailing list