2

How can I remove the default option -None- in the Select list? It should not be an option in my select list.

6

Edit the filed and make one of the option as default value in the select list and Make it required field.

3
  • It's not workking :( I have already set one option as default value but the -None- option is still there – noob Apr 10 '14 at 6:31
  • @Charm - What is the filed type for the select list? Is it List(text) or NOdereference? and make it required field – Krishna Mohan Apr 10 '14 at 6:35
  • The field type is List(text) – noob Apr 10 '14 at 6:36
0

If you make the field required None option will go away.. If want to remove none option for optional field follow below solution..

You can override the theme_options_none theme function. Follow below example. If you want to replace "- None -" with "SOME TEXT" everywhere, this theme implementation should do the trick:

function MYTHEMENAME_options_none($variables) {
  return t('SOME TEXT');
}

Place this function in your theme's template.php.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.