How do you make ChoiceField\'s label behave like ModelChoiceField? Is there a way to set an empty_label, or at least show a blank fiel
ChoiceField
ModelChoiceField
empty_label
Here's the solution that I used:
from myapp.models import COLORS COLORS_EMPTY = [('','---------')] + COLORS class ColorBrowseForm(forms.Form): color = forms.ChoiceField(choices=COLORS_EMPTY, required=False, widget=forms.Select(attrs={'onchange': 'this.form.submit();'}))