$className::preProcess($this);
$activityGroupTree = $this->_groupTree;
- if (!$this->_caseTypeId) {
- $params = CRM_Utils_Request::exportValues();
- if (isset($params['case_type_id'])) {
- $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);
+ $params = CRM_Utils_Request::exportValues();
+ CRM_Custom_Form_CustomData::preProcess($this, NULL, CRM_Utils_Array::value('case_type_id', $params, $this->_caseTypeId), 1, 'Case', $this->_caseId);
CRM_Custom_Form_CustomData::buildQuickForm($this);
}