[Zope] reading values from radio buttons (python script)

Chris Withers chris at simplistix.co.uk
Fri Sep 23 17:16:53 EDT 2005


Lennart Regebro wrote:
> Because the people who designed the HTML form functionality are brain
> dead morons, "Not checked" and "not existing" is the same thing.
> Therefore you need to do this:
> 
> request.form.get('fieldname', False)

Or, perversely, put in a 2nd hidden field, named something like 
fieldname_included, if you really want to tell the difference between 
the field being on the form and just unchecked...

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope mailing list