$defaults['communication_style_id'] = array_pop(CRM_Core_OptionGroup::values('communication_style', TRUE, NULL, NULL, 'AND is_default = 1'));
}
+ // CRM-17778 -- set preferred_mail_format to default if unset
+ if (empty($defaults['preferred_mail_format'])) {
+ $defaults['preferred_mail_format'] = array_search('Both', CRM_Core_SelectValues::pmf());
+ }
+
//set default from greeting types CRM-4575, CRM-9739
if ($form->_action & CRM_Core_Action::ADD) {
foreach (CRM_Contact_BAO_Contact::$_greetingTypes as $greeting) {
case 'Select':
$props['class'] = CRM_Utils_Array::value('class', $props, 'big') . ' crm-select2';
- if (!array_key_exists('placeholder', $props) && empty($fieldSpec['default'])) {
+ if (!array_key_exists('placeholder', $props)) {
$props['placeholder'] = $required ? ts('- select -') : ($context == 'search' ? ts('- any -') : ts('- none -'));
}
// TODO: Add and/or option for fields that store multiple values