From: yashodha Date: Mon, 26 Oct 2015 07:00:35 +0000 (+0530) Subject: CRM-16990: Custom fields are NOT being saved for some component custom data (activiti... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=97ae4877c984108f4b90f86fea029c480c6ba290;p=civicrm-core.git CRM-16990: Custom fields are NOT being saved for some component custom data (activities, membership ...) ---------------------------------------- * CRM-16990: Custom fields are NOT being saved for some component custom data (activities, membership ...) https://issues.civicrm.org/jira/browse/CRM-16990 --- diff --git a/CRM/Case/Form/Case.php b/CRM/Case/Form/Case.php index 392aaadaf2..cdd53b6bb5 100644 --- a/CRM/Case/Form/Case.php +++ b/CRM/Case/Form/Case.php @@ -179,6 +179,10 @@ class CRM_Case_Form_Case extends CRM_Core_Form { $className::preProcess($this); $activityGroupTree = $this->_groupTree; + if (!$this->_caseTypeId) { + $params = CRM_Utils_Request::exportValues(); + $this->_caseTypeId = $params['case_type_id']; + } // for case custom fields to populate with defaults if (!empty($_POST['hidden_custom'])) { CRM_Custom_Form_CustomData::preProcess($this, NULL, $this->_caseTypeId, 1, 'Case', $this->_caseId); diff --git a/CRM/Member/Form/Membership.php b/CRM/Member/Form/Membership.php index 5618efa6e4..9f5528b42b 100644 --- a/CRM/Member/Form/Membership.php +++ b/CRM/Member/Form/Membership.php @@ -242,6 +242,10 @@ class CRM_Member_Form_Membership extends CRM_Member_Form { } } + if (!$this->_memType) { + $params = CRM_Utils_Request::exportValues(); + $this->_memType = $params['membership_type_id'][1]; + } // when custom data is included in this page if (!empty($_POST['hidden_custom'])) { CRM_Custom_Form_CustomData::preProcess($this, NULL, $this->_memType, 1, 'Membership', $this->_id);