[Zope] <input type=hidden value='<dtml-var x>' name=x> and LOOP

Dieter Maurer dieter@handshake.de
Sat, 24 Mar 2001 21:14:34 +0100 (CET)


servel yannick writes:
 > ....
 > <input type=hidden value='D:\TEMP\DEFAULT.PR~' name='filename1'>
 > ....
 > 		s = s + "<input type=hidden value='%s' name='filename%s'>" %
 > ((REQUEST.filename + i), i)
When you need attribute access for an attribute not given
by a constant, you use "getattr", i.e. in your case:

   getattr(REQUEST, 'filename%d' % i)

In your special case, you could (alternatively) use:

   REQUEST.form['filename%d' % i]


Dieter