[Zope] Converting REQUEST style lists into real lists

Thomas B. Passin tpassin@mitretek.org
Fri, 27 Jul 2001 16:05:26 -0400


[Dieter Maurer]

> Thomas B. Passin writes:
>  > Actually there is another way, purely HTML and forms processing.  It's
a bit
>  > wierd, but it will work.  For every check box, include another hidden
field
>  > of the same name.  You can set the value to anything you like, maybe
"not
>  > checked".  Make it a list type field (the checkbox too) by using the
":list"
>  > syntax.
>  >
>  > Then if a check box of the same name has been checked, for that
variable
>  > name, your REQUEST will contain a list of length 2, but if not you get
a
>  > list of length one.   This is easy to test for with dhtml.
> When I read your reply, I remembered the ":default" variable
> suffix.
> It allows to define default values for form fields.
>
>

Ah! Strike another one for Zope!

Cheers,

Tom P