On Jun 15, 3:13 pm, Gabriel Farrell <[EMAIL PROTECTED]> wrote:
> I've just replaced the RadioSelect widget with CheckboxSelectMultiple
> for one field in my view.  Here's the relevant code:
>
>         self.fields['patron_type'] = forms.ChoiceField(choices=(
>                 (pt.id, pt.name) for pt in patron_type_choices),
>                 widget=widgets.CheckboxSelectMultiple())
>
> It shows up fine in the browser, but now I receive the "Select a valid
> choice. That choice is not one of the available choices." error no
> matter which box I check on that field.  Have I missed something?
>
> Gabe

Ah.  Figured it out.  ChoiceField needs to be MultipleChoiceField.
Thanks for the help, everybody! ;)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to