Skip to content
Snippets Groups Projects
Commit 78a69cc8 authored by Monish Deb's avatar Monish Deb
Browse files

additional fix

parent cc8a2fe3
No related branches found
No related tags found
No related merge requests found
......@@ -10,18 +10,19 @@ This hook is available in CiviCRM 4.7.27+ (maybe depends on the commit).
## Definition
hook_civicrm_alterEntityRefParams(&$params)
hook_civicrm_alterEntityRefParams(&$params, $formName)
## Parameters
- array `$params` - parameters of entityRef field
- string `$formName` - form name
## Example
```php
function myextension_civicrm_alterEntityRefParams(&$params) {
// use your custom API to fetch tags of your choice
if ($params['entity'] == 'tag') {
function myextension_civicrm_alterEntityRefParams(&$params, $formName) {
// use your custom API to fetch tags of your choice on specific form say on 'New Individual'
if (formName == 'CRM_Contact_Form_Contact' && $params['entity'] == 'tag') {
$params['entity'] = 'my_tags';
$params['api'] = array('params' => array('parent_id' => 292));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment