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 demographics section.
21 class CRM_Contact_Form_Inline_Demographics
extends CRM_Contact_Form_Inline
{
24 * Build the form object elements.
26 public function buildQuickForm() {
27 parent
::buildQuickForm();
28 CRM_Contact_Form_Edit_Demographics
::buildQuickForm($this);
34 public function postProcess() {
35 $params = $this->exportValues();
37 // Process / save demographics
38 if (empty($params['is_deceased'])) {
39 $params['is_deceased'] = FALSE;
40 $params['deceased_date'] = NULL;
43 $params['contact_type'] = 'Individual';
44 $params['contact_id'] = $this->_contactId
;
46 if (!empty($this->_contactSubType
)) {
47 $params['contact_sub_type'] = $this->_contactSubType
;
50 CRM_Contact_BAO_Contact
::create($params);