10

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

barin
  • 4,481
  • 6
  • 28
  • 29

1 Answers1

26

Use empty_label=None

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

Please check the doc for ModelChoiceField

cethegeek
  • 6,286
  • 35
  • 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