From: jitendrapurohit Date: Tue, 4 Oct 2016 11:55:44 +0000 (+0530) Subject: CRM-19452 - remove common fields only if profile is not configured for onbehalf/honor X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d7d630beaa7d1ad00387f8a0bc5cce44804feb4d;p=civicrm-core.git CRM-19452 - remove common fields only if profile is not configured for onbehalf/honor --- diff --git a/CRM/Contribute/Form/ContributionBase.php b/CRM/Contribute/Form/ContributionBase.php index 45f13c35ad..7c6109f80a 100644 --- a/CRM/Contribute/Form/ContributionBase.php +++ b/CRM/Contribute/Form/ContributionBase.php @@ -625,7 +625,10 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form { CRM_Core_Session::setStatus(ts('Some of the profile fields cannot be configured for this page.'), ts('Warning'), 'alert'); } - $fields = array_diff_assoc($fields, $this->_fields); + //remove common fields only if profile is not configured for onbehalf/honor + if (!in_array($profileContactType, array('honor', 'onbehalf'))) { + $fields = array_diff_assoc($fields, $this->_fields); + } CRM_Core_BAO_Address::checkContactSharedAddressFields($fields, $contactID); $addCaptcha = FALSE;