}
$form->addGroup($commPreff, 'preferred_communication_method', ts('Preferred Method(s)'));
- $form->add('select', 'preferred_language',
- ts('Preferred Language'),
- array(
- '' => ts('- select -')) +
- CRM_Contact_BAO_Contact::buildOptions('preferred_language')
- );
+ $form->addSelect('preferred_language');
if (!empty($privacyOptions)) {
$commPreference['privacy'] = $privacyOptions;
$form->addRule("email[$blockId][email]", ts('Email is not valid.'), 'email');
if (isset($form->_contactType) || $blockEdit) {
//Block type
- $form->addElement('select', "email[$blockId][location_type_id]", '', CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id'));
+ $form->addSelect("email[$blockId][location_type_id]", array('data-api-entity' => 'email', 'class' => 'six'));
$multipleBulk = CRM_Core_BAO_Email::isMultipleBulkMail();
$form->applyFilter('__ALL__', 'trim');
//IM provider select
- $form->addElement('select', "im[$blockId][provider_id]", '', CRM_Core_PseudoConstant::get('CRM_Core_DAO_IM', 'provider_id'));
+ $form->addSelect("im[$blockId][provider_id]", array('data-api-entity' => 'im', 'class' => 'six'));
//Block type select
- $form->addElement('select', "im[$blockId][location_type_id]", '', CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id'));
+ $form->addSelect("im[$blockId][location_type_id]", array('data-api-entity' => 'im', 'class' => 'six'));
//IM box
$form->addElement('text', "im[$blockId][name]", ts('Instant Messenger'),
$form->applyFilter('__ALL__', 'trim');
//Website type select
- $form->addElement('select', "website[$blockId][website_type_id]", '', CRM_Core_PseudoConstant::get('CRM_Core_DAO_Website', 'website_type_id'));
+ $form->addSelect("website[$blockId][website_type_id]", array('data-api-entity' => 'website', 'class' => 'six'));
//Website box
$form->addElement('text', "website[$blockId][url]", ts('Website'),