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

servel yannick yservel@glam.ac.uk
Sun, 25 Mar 2001 16:44:34 +0100


Thanks a lot, it works perfectly

You have fixed my problem

Regards

Yannick

-----Original Message-----
From: Dieter Maurer [mailto:dieter@handshake.de]
Sent: 24 March 2001 20:15
To: servel yannick
Cc: zope@zope.org
Subject: Re: [Zope] <input type=hidden value='<dtml-var x>' name=x> and
LOOP


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