[Zope] Trying to get Form/Checkbox value into Python Script

Jens Vagelpohl jens@zope.com
Sat, 29 Sep 2001 08:22:35 -0400


ron,

in a python script you can assign a "default" value in the parameter list,
  just like in the argument list to a pythoin function itself.

i would set this checkbox parameter value to a default of maybe None in 
the parameter list and in the script itself simply assume that if the 
value is indeed None the checkbox has not been selected.

jens




On Saturday, September 29, 2001, at 08:09 , Ronald L. Chichester wrote:

> I've found the problem with getting data into a python script.  It is
> with the checkboxes.
>
> If the checkbox is checked, the parameter is passed and the boolean
> property is set properly.
>
> However, if the checkbox is unchecked, I get a Zope error indicating
> that the parameter was NOT passed.  Same form, same everything except in
> the test second test case the checkbox was unchecked.  In essense, it
> only passes the checkbox value when the checkbox is checked.  Does
> anyone know what I'm doing wrong?  How do you pass boolean values (i.e.,
> from checkboxes) to a python script when the box is unchecked?
>
> Thanks,
>
> Ron