[Zope] Newbie Qu. Setting a boolean ...

Dieter Maurer dieter@handshake.de
Mon, 19 Feb 2001 00:00:13 +0100 (CET)


Sandy Britain writes:
 > I've been batting my head over how to set a boolean property of an
 > object from a checkbox in a form.
 > can anyone help?
You can either use a default value for your checkbox control:

    <input type="hidden" name="mycheckboxname:int:default" value="0">


or set it in your action:

   <dtml-unless mycheckboxname>
     <dtml-call "REQUEST.set('mycheckboxname',0)">
   </dtml-unless>


More details in 

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



Dieter