-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
as per https://github.com/django/django/blob/main/django/forms/widgets.py#L839
unfortunately the widget inherits from radioselect which means that isinstance will return true an show a radio select due to the order in https://github.com/django-crispy-forms/crispy-tailwind/blob/main/crispy_tailwind/templates/tailwind/field.html#L20
as is demonstrated here
(Pdb) isinstance(form.fields.get('infrastructure').widget, forms.CheckboxSelectMultiple)
True
(Pdb) isinstance(form.fields.get('infrastructure').widget, forms.RadioSelect)
True
a working fix would be to test for the class name rather?
form.fields.get('infrastructure').widget.__class__.__name__
'CheckboxSelectMultiple'
Metadata
Metadata
Assignees
Labels
No labels