[Zope] HTML forms: how to get the value of an unchecked checkbox?
Thomas B. Passin
tpassin@mitretek.org
Tue, 8 May 2001 10:07:30 -0400
[Stephane Bortzmeyer]
> Thomas B. Passin <tpassin@mitretek.org> wrote
> a message of 36 lines which said:
>
> > 1) Your dtml or script can check to see if that key is in the form, and
act
> > appropriately if it is not there.
>
> My script cannot check because parameters are apparently tested by
> Zope before the first line of the script is executed.
>
I don't quite know what you are referring to here. 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
won't remove any of it.
You have to make sure that the REQUEST gets passed to your script, then the
script can access it. I haven't used Python scripts so far, if that's what
you are using, but I think that the REQUEST comes with the "context"
parameter. If not, you should be able to pass it directly to the script.
If you were using an external method, you would pass it like so: <dtml-var
"yourExternalMethod(REQUEST)">.
You should, I think, make sure that you know how to send the REQUEST object
to your script, then everything else should easy.
Cheers,
Tom P