Thanks for the information. I have been pulling my hair out because I have
some lengthy forms (wizards) and it can be harrowing at times. :) I think
the best solution for my situation is to do a JS/CSS tabbed solution, so
it's one form. Are you aware of any limitations on the size of posted data?
I haven't hit any "walls" yet with respect to that.


-----Original Message-----
From: J Cameron Cooper [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 15, 2005 12:05 PM
To: David Ayres
Subject: Re: [Zope] Form Variables

David Ayres wrote:
> I've been working around this issue for literally years and finally have
> 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
> 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.

The specifications for forms only require certain "successful" controls
to be submitted, and most browsers work this way. This is specially
noticable with checkboxes, which when on are in the request and absent
when off. See:

Frankly, I consider this behavior bizarre and unhelpful, but there's not
much to be done about it protocol-side. I would imagine there's a
hstorical reason.

For use in Zope, keep in mind that parameters for both Python scripts
and Z SQL Methods allow for default values, so you don't have to rely on
  a parameter being present in the request. In ZPTs there's conditional
expressions, and in DTML the 'missing' pseudo-attribute.


"Building Websites with Plone"

Enfold Systems, LLC

Zope maillist  -
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to