I’ve a ModelForm with Radio buttons that is generating an extra option(o ———). This is the output:
o ---------
o Option 1
o Option 2
o Option 3
How can I remove the (o ———)?
Here is my ModelForm:
class SomeForm(forms.ModelForm):
sometype = forms.ModelChoiceField(queryset=SomeType.objects.all(), required=True, widget=forms.RadioSelect)
class Meta:
model = Some
Any clues on how to achieve this?
Best Regards,
This can be done with an extra
empty_label=Noneparameterhttps://docs.djangoproject.com/en/dev/ref/forms/fields/#modelchoicefield