10

How do i remove the default --------- choice from ModelChoiceField?

barin
  • 4,401
  • 6
  • 26
  • 27

1 Answers1

26

Use empty_label=None

field2 = forms.ModelChoiceField(queryset=..., empty_label=None)

Please check the doc for ModelChoiceField

cethegeek
  • 6,136
  • 34
  • 42
  • 6
    Also note that if the field is required and has a default value, the empty option will automatically be removed. – Carl Meyer Dec 09 '09 at 02:36