Re: [Zope] reading values from radio buttons (python script)
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 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] reading values from radio buttons (python script)
I have made a form with various quetions . The answers are given by radio buttons and check boxes. When the user submit the form it is send to my e-mail by zope mailhost. How can I get the radio and checkbox values ? I only know to get values from text boxes... my code for the form is form action=mailAction.py method=POST , I use ZPT for the form and python script to get the values and send the mail. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] reading values from radio buttons (python script)
On 9/21/05, Georgakopoulos Nicolas [EMAIL PROTECTED] wrote: I have made a form with various quetions . The answers are given by radio buttons and check boxes. When the user submit the form it is send to my e-mail by zope mailhost. How can I get the radio and checkbox values ? I only know to get values from text boxes... 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) -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )