1👍
✅
You need to specify CheckBoxMultipleSelect
widget for the form field.
E.g.
def MyForm(forms.Form):
favorite_colors = forms.MultipleChoiceField(required=False,
widget=CheckboxSelectMultiple, choices=FAVORITE_COLORS_CHOICES)
...
Reference: Widgets
0👍
for example
CUSTOMERTYPE = (
(u'-', u'-'),
(u'Single', u'Single Customer'),
(u'Community', u'Community Change'),
)
CustomerType = forms.ChoiceField(choices=CUSTOMERTYPE)
- [Answer]-Sharing variables between urlpatterns in Django
- [Answer]-Clarity: Django user cookie exists after logout
Source:stackexchange.com