[Zope] Restatement of list problem
Schmidt, Allen J.
Fri, 21 Jun 2002 08:35:58 -0400
You are correct in how the hidden fields were set up.
In your example, what if 'br' comes in as a single...not a list? Won't the
dtml-in throw an error if it's not a list??
My thought was to try this (semi-pseudo code):
<if string.find(br,'[')> //then it's a list
<else> // not a list but a single
Won't using the string.find expose the list so the dtml-in won't blow up?
From: Dieter Maurer [mailto:email@example.com]
Sent: Wednesday, June 19, 2002 1:49 PM
To: Schmidt, Allen J.
Subject: Re: [Zope] Restatement of list problem
Schmidt, Allen J. writes:
> Maybe I over-complicated my original request.
> I have a form field that is a list:
> ['2 DR CONVERTIBLE','2 DR COUPE','2 DR HATCHBACK']
> The URL looks like this:
> When I pick for years 2002 and 2001 for the above body types, the URL
> changes a bit:
This looks as if you would have your list in a hidden variable
of the form
<input name="bt:list" type="hidden" value="&dtml-bt;">
When this arrives at the Zope server, you will get a list with
one string that respresents the former list as a string.
You need instead:
<input name="bt:list" type="hidden" value="&dtml-sequence-item;">
<input name="bt:tokens" type="hidden" value="">
i.e. each list element must gets its one "input" control.