I would like to change the default dropdown "- None -" value because it doesn't make much sense with regards to my entry context. How can I do about doing this? For simplicity's sake, I'd be fine with change all the default values to "-------" universally. Any help would be greatly appreciated. Thanks!

Comments

CalvinMcGee’s picture

Well, you can change in the translation "- None -" to something else, and it will be used everywhere. However I'm also interested in changing the label "- None -" to something else.

CalvinMcGee’s picture

I solved it by altering the form in a custom module and implementing hook_form_alter:

function mymodule_form_alter(&$form, &$form_state, $form_id) {
    switch ($form_id) {
        case 'my_form_name':
            $form['field_cs_my_favorite_product']['und']['#options']['_none'] = t('Choose product');
            break;
    }
}
pasqualle’s picture

Category: task » support
Status: Active » Closed (fixed)