3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
19 * Form helper class for custom data section.
21 class CRM_Contact_Form_Inline_CustomData
extends CRM_Contact_Form_Inline
{
31 * Entity type of the table id.
35 protected $_entityType;
40 public function preProcess() {
43 $this->_groupID
= CRM_Utils_Request
::retrieve('groupID', 'Positive', $this, TRUE, NULL);
44 $this->assign('customGroupId', $this->_groupID
);
45 $customRecId = CRM_Utils_Request
::retrieve('customRecId', 'Positive', $this, FALSE, 1);
46 $cgcount = CRM_Utils_Request
::retrieve('cgcount', 'Positive', $this, FALSE, 1);
47 $subType = CRM_Contact_BAO_Contact
::getContactSubType($this->_contactId
, ',');
48 CRM_Custom_Form_CustomData
::preProcess($this, NULL, $subType, $cgcount,
49 $this->_contactType
, $this->_contactId
);
53 * Build the form object elements for custom data.
55 public function buildQuickForm() {
56 parent
::buildQuickForm();
57 CRM_Custom_Form_CustomData
::buildQuickForm($this);
61 * Set defaults for the form.
65 public function setDefaultValues() {
66 return CRM_Custom_Form_CustomData
::setDefaultValues($this);
72 public function postProcess() {
73 // Process / save custom data
74 // Get the form values and groupTree
75 $params = $this->controller
->exportValues($this->_name
);
76 CRM_Core_BAO_CustomValueTable
::postProcess($params,
84 CRM_Contact_BAO_GroupContactCache
::opportunisticCacheFlush();