Am Mittwoch, den 15.06.2005, 11:27 -0400 schrieb David Ayres:
I've been working around this issue for literally years and finally have the time to seek a real solution. :) I can't find much information, so I'm assuming I'm just taking the wrong approach.
Whenever a form is posted, the text fields always show up in the request.form, however any other type of form element that has not been given a value does not show up. None of the fields have the ignore_empty attribute. Besides using the missing= attribute, what other options are there?
Most of my forms have optional fields and this is especially painful when trying to use ZSQL Methods or when creating multipage forms that refer to earlier form values.
Any suggestions would be greatly appreciated!!
Zope has along with nice type converters, also a workaround for the checkbox-problem: http://www.zope.org/Members/Zen/howto/FormVariableTypes However, working with request.form.get('value',default) is often more robust.