Enhance EntityRef to widget to show create new option when contacts are restricted by multiple contact type
Current behavior
Below code works fine and shows create new
option when contacts are restricted by single contact type.
$this->addEntityRef('my_field', ts('Select Contact'), [
'api' => [
'params' => ['contact_type' => 'Organization'],
],
'create' => TRUE,
]);
However, when contacts are restricted by multiple contacts create new
option is not available
$this->addEntityRef('my_field', ts('Select Contact'), [
'api' => [
'params' => ['contact_type' => ['IN' => ["Individual", "Organization"]]]
],
'create' => TRUE,
]);
Expected behavior
- It should show create new options for Individual and Organization.