How do i remove the default --------- choice from ModelChoiceField?
Asked
Active
Viewed 4,676 times
1 Answers
26
Use empty_label=None
field2 = forms.ModelChoiceField(queryset=..., empty_label=None)
Please check the doc for ModelChoiceField

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