How to remove label from MultipleChoiceField in template?
forms.py:
class RequirementAddForm(forms.ModelForm):
symbol = forms.MultipleChoiceField(required=False, widget=forms.CheckboxSelectMultiple, choices=REQUIREMENTS_CHOICES,)
class Meta:
model = Requirement
fields = ('symbol',)
template.html:
{{ form }}
Here are some possible solutions
1) Use label="" when inside your form definition
2) Override the label, if you are using an inherited form and don't have direct access
def __init__(self, *args, **kwargs):
super(FormClass, self).__init__(*args, **kwargs)
self.fields['field'].label = ''
Another possible option is to pass auto_id=False into the form