$form->applyFilter('__ALL__', 'trim');
//phone type select
- $form->addSelect("phone[$blockId][phone_type_id]", array(
- 'entity' => 'phone',
- 'class' => 'eight',
- 'placeholder' => NULL,
- ));
-
+ $form->addField("phone[$blockId][phone_type_id]", array(
+ 'entity' => 'phone',
+ 'class' => 'eight',
+ 'placeholder' => NULL,
+ ));
//main phone number with crm_phone class
- $form->add('text', "phone[$blockId][phone]", ts('Phone'), array_merge(CRM_Core_DAO::getAttribute('CRM_Core_DAO_Phone', 'phone'), array('class' => 'crm_phone twelve')));
- // phone extension
- $form->addElement('text', "phone[$blockId][phone_ext]", ts('Extension'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_Phone', 'phone_ext'));
-
+ $form->addField("phone[$blockId][phone]", array('entity' => 'phone', 'class' => 'crm_phone twelve'));
+ $form->addField("phone[$blockId][phone_ext]", array('entity' => 'phone'));
if (isset($form->_contactType) || $blockEdit) {
//Block type select
- $form->addSelect("phone[$blockId][location_type_id]", array(
- 'entity' => 'phone',
+ $form->addField("phone[$blockId][location_type_id]", array(
+ 'entity' => 'phone',
'class' => 'eight',
'placeholder' => NULL,
));