_groupID = CRM_Utils_Request::retrieve('groupID', 'Positive', $this, TRUE, NULL, $_REQUEST); $this->assign('customGroupId', $this->_groupID); $customRecId = CRM_Utils_Request::retrieve('customRecId', 'Positive', $this, FALSE, 1, $_REQUEST); $cgcount = CRM_Utils_Request::retrieve('cgcount', 'Positive', $this, FALSE, 1, $_REQUEST); $subType = CRM_Contact_BAO_Contact::getContactSubType($this->_contactId, ','); CRM_Custom_Form_CustomData::preProcess($this, NULL, $subType, $cgcount, $this->_contactType, $this->_contactId); } /** * Build the form object elements for custom data. */ public function buildQuickForm() { parent::buildQuickForm(); CRM_Custom_Form_CustomData::buildQuickForm($this); } /** * Set defaults for the form. * * @return array */ public function setDefaultValues() { return CRM_Custom_Form_CustomData::setDefaultValues($this); } /** * Process the form. */ public function postProcess() { // Process / save custom data // Get the form values and groupTree $params = $this->controller->exportValues($this->_name); CRM_Core_BAO_CustomValueTable::postProcess($params, 'civicrm_contact', $this->_contactId, $this->_entityType ); $this->log(); // reset the group contact cache for this group CRM_Contact_BAO_GroupContactCache::remove(); $this->response(); } }