}
if ($val) {
$entity = $field->getAttribute('data-api-entity');
- $api = json_decode($field->getAttribute('data-api-params'), TRUE);
- $params = CRM_Utils_Array::value('params', $api, array());
+ $params = json_decode($field->getAttribute('data-api-params'), TRUE);
// Support serialized values
if (strpos($val, CRM_Core_DAO::VALUE_SEPARATOR) !== FALSE) {
$val = str_replace(CRM_Core_DAO::VALUE_SEPARATOR, ',', trim($val, CRM_Core_DAO::VALUE_SEPARATOR));
$field->setValue($val);
}
- $result = civicrm_api3($entity, 'getlist', array('id' => $val, 'params' => $params));
+ $result = civicrm_api3($entity, 'getlist', array('id' => $val) + $params);
if ($field->isFrozen()) {
$field->removeAttribute('class');
}