I'm creating a page where the user can add other users to a group. I am 
able to dynamically fetch all users and list them on a template with 
checkboxes. I'm getting stuck creating a form for them however.

I read this post (among others)

http://stackoverflow.com/questions/19947538/django-form-with-unknown-number-of-checkbox-fields-and-multiple-actions

I don't understand what should be used to define "choices" in this example. 
He says fill it with a queryset but which one?

choices = queryset_of_valid_choices,

Would that be something like objects_list.all()?


Currently my form is defined as this:

class UpdateGroup(forms.Form):
    non_member_checkboxes = forms.MultipleChoiceField(
        widget  = forms.CheckboxSelectMultiple,
    )

I know it's missing something because the form.is_valid is always False.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8a9015f9-4ffd-46ca-976b-7af1a10a6a59%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to