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

Casey Duncan cduncan@kaivo.com
Tue, 01 May 2001 08:16:36 -0600

Gitte Wange wrote:
> Hello,
> I have a problem doing <subject>
> I have added a checkbox in a form, but when the submit button is hitted, the
> value of the checkbox isn't passed along to the receiving method.
> The checkbox code looks like this:
> <INPUT TYPE="checkbox" NAME="isPublic">
> Pretty normal I would say .. but perhaps someone out there have had my
> problem ?
> Regards,

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.

| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com