Form with CheckBoxSelectMultiple not validating

70 views
Skip to first unread message

Sithembewena L. Dube

unread,
Jun 7, 2019, 2:57:23 PM6/7/19
to django...@googlegroups.com
I have a form with a CheckBoxSelectMultiple widget. When I select choices and submit the form, `is_valid()` returns False. What could be the cause?

Kind regards,
Lloyd

Sent with Shift

Joe Reitman

unread,
Jun 7, 2019, 4:12:32 PM6/7/19
to Django users
Can you show the code?

Sithembewena L. Dube

unread,
Jun 10, 2019, 9:39:51 AM6/10/19
to django...@googlegroups.com
Thanks for responding @Joe. I had figured out what the issue was. I ended up with:

```
tour_options = forms.MultipleChoiceField(
label='Select tour activities',
choices=settings.TOUR_OPTIONS,
widget=forms.CheckboxSelectMultiple()
)

```
Kind regards,
Lloyd


Sent with Shift

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7aaca4cd-2e46-458a-bef5-17887b9e46c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages