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 an Demographics object.
21 class CRM_Contact_Form_Edit_Demographics
{
24 * Build the form object elements for Demographics object.
26 * @param CRM_Core_Form $form
27 * Reference to the form object.
29 public static function buildQuickForm(&$form) {
30 $form->addField('gender_id', ['entity' => 'contact', 'type' => 'Radio', 'allowClear' => TRUE]);
32 $form->addField('birth_date', ['entity' => 'contact'], FALSE, FALSE);
34 $form->addField('is_deceased', ['entity' => 'contact', 'label' => ts('Contact is Deceased'), 'onclick' => "showDeceasedDate()"]);
35 $form->addField('deceased_date', ['entity' => 'contact'], FALSE, FALSE);
39 * Set default values for the form. Note that in edit/view mode
40 * the default values are retrieved from the database
43 * @param CRM_Core_Form $form
44 * @param array $defaults
46 public static function setDefaultValues(&$form, &$defaults) {