I have a form which contains checkboxes exclusively. Each checkbox
has a distinct value.
I want a csv string of the values of the boxes which are checked.
First, I thought I'd retrieve a list of the fields with something that
looked like this:
for fields in form:
if field.attrs['checked']=='checked':
list+=field.attrs['value']+','
Unfortunately, those attributes don't seem to exist or be accessible.
It's bothersome.
Advice on this specific problem would be welcome. So would advice on
taking a bunch of checkboxes from a form and, based on which are
checked, creating a list to put into a comma separated integer field
fit for a database.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
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.