From b46085d122f0e9a139d4fd1ba80dc38bc1562017 Mon Sep 17 00:00:00 2001 From: Tim Mallezie Date: Sun, 17 May 2015 15:30:09 +0200 Subject: [PATCH] use addField in Household form --- CRM/Contact/Form/Edit/Household.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/CRM/Contact/Form/Edit/Household.php b/CRM/Contact/Form/Edit/Household.php index 417a826104..8cfbb3c92e 100644 --- a/CRM/Contact/Form/Edit/Household.php +++ b/CRM/Contact/Form/Edit/Household.php @@ -53,23 +53,21 @@ class CRM_Contact_Form_Edit_Household { * @return void */ public static function buildQuickForm(&$form, $inlineEditMode = NULL) { - $attributes = CRM_Core_DAO::getAttribute('CRM_Contact_DAO_Contact'); - $form->applyFilter('__ALL__', 'trim'); if (!$inlineEditMode || $inlineEditMode == 1) { // household_name - $form->add('text', 'household_name', ts('Household Name'), $attributes['household_name']); + $form->addField('household_name'); } if (!$inlineEditMode || $inlineEditMode == 2) { // nick_name - $form->addElement('text', 'nick_name', ts('Nickname'), $attributes['nick_name']); - $form->addElement('text', 'contact_source', ts('Source'), CRM_Utils_Array::value('source', $attributes)); + $form->addField('nick_name'); + $form->addField('contact_source', array('label' => ts('Source'))); } if (!$inlineEditMode) { - $form->add('text', 'external_identifier', ts('External ID'), $attributes['external_identifier'], FALSE); + $form->addField('external_identifier', array('label' => ts('External ID'))); $form->addRule('external_identifier', ts('External ID already exists in Database.'), 'objectExists', -- 2.25.1