[Zope] Accessing individual items within a list
McDonnell, Larry
lmcdonnell@protonenergy.com
Fri, 30 May 2003 13:18:55 -0400
Hi,
Let try this again.
I have a form with the following input statements:
<input type="text" name="pbtemp[1]" size="6"> = 'aa'
<input type="text" name="pbtemp[2]" size="6"> = 'bb'
<input type="text" name="pbtemp[3]" size="6"> = 'cc'
After the submit I can display the variables using this method:
<dtml-var pbtemp[1]>
<dtml-var pbtemp[2]>
<dtml-var pbtemp[3]>
I see
aa bb cc
I am trying to find a way to use this method but my syntax is wrong:
<dtml-in expr="_.range(3)">
<dtml-var pbtemp[_['sequence-index']]>
</dtml-in>
I see the following error:
Error Type: KeyError
Error Value: pbtemp[_['sequence-index']]
I have spent the morning googling around but the examples did not meet my
needs after I tested them. Can this be done and if so how? Thanks.