Django-4.2.8, django-crispy-forms-2.1, checkboxes not return a list

2023-12-08 Thread b...@tanners.org
I have a Django ModelForm (below) that I include a customized html snipped. And I am using django-crispy forms. Added the clean() method to help explain my problem. ```python class ProfileForm(forms.ModelForm): self.helper.layout = Layout( Fieldset( "Triage {{ settings.triage }}",

Re: Django-4.2.8, django-crispy-forms-2.1, checkboxes not return a list

2023-12-09 Thread Vincenzo Celano
Ciao I think the problem is in the NAME of the checkbox. 4 checkbox with same name, the form will consider only the last one. I think, if you check for example 1 and x you will get: 'not_willing_to_judge: 'x''. Try to rename checkbox: not_willing_to_judge_1, not_willing_to_judge_2, not_willing_to_