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

Thomas B. Passin tpassin@mitretek.org
Tue, 1 May 2001 11:34:33 -0400


[Casey Duncan]

>
> You could try this:
>
> <input type="hidden" name="isPublic:default" value="0">
> <input type="checkbox" name="isPublic" value="1">
>
> If the checkbox is not checked, Zope will pass the default value in the
> hidden field instead.
>
 But if it IS checked, I believe the form will contain a list of the two
values, that is,

isPublic=["0","1"]

At least, it works like that if you have several check boxes of the same
name.  So one way or another, somewhere you have to check the nature of the
returned data.

Cheers,

Tom P