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-actionsI 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.