[Zope] Passing the value of a checkbox from a form to a dtml-method

Holger Hoffmann hohoff@rz.uni-potsdam.de
Tue, 01 May 2001 16:15:16 +0200


Hi,

Max MXller Rasmussen wrote:
> 
> > From: Gitte Wange [mailto:gitte@mmmanager.org]
> 
> > value of the checkbox isn't passed along to the receiving method.
> > The checkbox code looks like this:
> > <INPUT TYPE="checkbox" NAME="isPublic">
> 
> Perhaps you have forgotten the value it should have when checked?
> 
> <INPUT TYPE="checkbox" NAME="isPublic:int" value="1">
> 
> Furthermore if a checkbox isn't checked, no value will be send at all.

one solution:

<input type"hidden" name="isPublic:default" value="0">
<input type"checkbox" name="isPublic" value="1">

so when the chackbox isn't checked you get the default
value.
 
... Holger