Problem
When I want to filter supporters by country, the filter is not applied.
This is because the widget provides multiple choices, but the form field is a single choice field:
|
self.fields[facet_key] = forms.ChoiceField( |
|
widget=forms.widgets.CheckboxSelectMultiple, |
|
choices=choices, |
|
required=False, |
|
) |
As a result the data is misaligned when the form is validated.
Proposed solution
Use MultipleChoiceField.
Problem
When I want to filter supporters by country, the filter is not applied.
This is because the widget provides multiple choices, but the form field is a single choice field:
janeway/src/core/forms/forms.py
Lines 698 to 702 in 3cad511
As a result the data is misaligned when the form is validated.
Proposed solution
Use
MultipleChoiceField.