_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 * * @return void * @access public */ public function buildQuickForm() { parent::buildQuickForm(); CRM_Custom_Form_CustomData::buildQuickForm($this); } /** * Set defaults for the form * * @return array * @access public */ public function setDefaultValues() { return CRM_Custom_Form_CustomData::setDefaultValues($this); } /** * Process the form * * @return void * @access public */ 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, $this->_groupTree[$this->_groupID]['fields'], 'civicrm_contact', $this->_contactId, $this->_entityType ); // reset the group contact cache for this group CRM_Contact_BAO_GroupContactCache::remove(); $this->response(); } }