[Zope] Converting REQUEST style lists into real lists

Dieter Maurer dieter@handshake.de
Fri, 27 Jul 2001 21:07:47 +0200 (CEST)


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.


More info:

  URL:http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html



Dieter