Details
-
Type: New Feature
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.0
-
Fix Version/s: 3.0
-
Component/s: Core CiviCRM
-
Labels:None
Description
Currently any Contact Reference custom field will returns ALL contacts to the user. This simplifies implementation, but exposes ALL names from the db to the end user. For many use cases, there is a need to filter this listing - for example to expose only contacts in a specific Group. This hook allows folks to modify the query. It also sends in the custom field id, so the hook implementation can be custom field / context specific.
Documentation and an example can be found here (until 3.0 doc is transitioned to stable):
http://wiki.civicrm.org/confluence/display/CRMUPCOMING/CiviCRM+hook+specification
and then here:
http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+hook+specification