From d7d630beaa7d1ad00387f8a0bc5cce44804feb4d Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Tue, 4 Oct 2016 17:25:44 +0530 Subject: [PATCH] CRM-19452 - remove common fields only if profile is not configured for onbehalf/honor --- CRM/Contribute/Form/ContributionBase.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.25.1