[Zope] Converting REQUEST style lists into real lists
Dieter Maurer
dieter@handshake.de
Thu, 26 Jul 2001 21:34:43 +0200 (CEST)
Albert L. Ting writes:
> ...
> Yes, that is a list, but not the list I'm looking for. What I want is an
> exhaustive list. If the person selected every other checkbox in the above
> example, starting with the first one, I want zope to return a six element
> list like below.
>
> ['1','','3','','5','']
Zope cannot do this for you without application knowledge:
As of the HTML spec, a checkbox is only successful,
if it is checked. Unsuccessfull form controls do not
contribute to the form result set.
Zope has no chance to detect them from the request
data.
Your application (Python Script) can have a list of possible
checkbox values and build the list you want from that
available in the request.
Maybe,
URL:http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html
helps you to recognize wishes that cannot be fulfilled.
Dieter