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.
--On Freitag, 30. Mai 2003 13:18 Uhr -0400 "McDonnell, Larry" <lmcdonnell@protonenergy.com> wrote:
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'
Using names with slice notation is really odd. What is the purpose???
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']]
range(2) iterates from 0..2 and not from 1..3. -aj
participants (2)
-
Andreas Jung -
McDonnell, Larry