[Zope] HTML forms: how to get the value of an unchecked checkbox?
Thomas B. Passin
tpassin@mitretek.org
Tue, 8 May 2001 18:16:26 -0400
[Stephane Bortzmeyer]
> Thomas B. Passin <tpassin@mitretek.org> wrote
> > The form data is
> > contained in the REQUEST object (i.e., REQUEST.form). I assure you that
all
> > the form data from the checkboxes and so on will be in the REQUEST.
Zope ...
>
>I have now a better version, where the form is 100%
> standard HTML form, and the script is:
> ...
> if REQUEST.form.has_key('milk'):
> milk = " with milk"
> else:
> milk = ""
> if REQUEST.form.has_key('sugar'):
> sugar = " with sugar"
> else:
> sugar = ""
> return "<P>You asked for " + beverage + sugar + milk
>
[Tom]
OK, you've got it. Well done.
Cheers,
TomP