On Sat, 2007-03-31 at 01:30 -0700, Mark Engelberg wrote:
> I'm trying to understand how to process checkboxes.
> I found this thread useful:
> http://groups.google.com/group/django-users/browse_thread/thread/5f7b06a23af50c56
> 
> However, I don't know how to get a list of _unchecked_ checkboxes.
> This is important, because I'm generating the list of ids dynamically.
>  I want to approve the checked items, and delete the unchecked items.
> Make sense?

HTML form submissions will not send you information about unselected
form items. So either you need a way to regenerate the list from
scratch, or you need to include the ids in a hidden field in the form
itself.

In the latter case, make sure to somehow protect the list of ids so that
they cannot be tampered with by the form submitter -- who could
otherwise just add extra ids to the list and cause potentially unwanted
deletions. One way to do this would be to include a hash of the id
values plus a secret key. Or encrypt the id list with some form of
symmetrical encryption.

Regards,
Malcolm


--~--~---------~--~----~------------~-------~--~----~
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