dev/user-interface#13 fix regression where option to email is not longer displayed.
[civicrm-core.git] / CRM / Contribute / Form / Contribution.php
index 49e580d30fcd1c4c3689d42848e8ad1f8c20f9ef..04fa3e074a952d11d1be0cb61c9e7a46c27e3688 100644 (file)
@@ -607,8 +607,8 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
     $this->assign('customDataSubType', $this->_contributionType);
     $this->assign('entityID', $this->_id);
 
-    $contactField = $this->addEntityRef('contact_id', ts('Contributor'), ['create' => TRUE], TRUE);
-    if ($this->_context != 'standalone') {
+    $contactField = $this->addEntityRef('contact_id', ts('Contributor'), ['create' => TRUE, 'api' => ['extra' => ['email']]], TRUE);
+    if ($this->_context !== 'standalone') {
       $contactField->freeze();
     }