[Zope] example of REQUEST.form.keys() or REQUEST.form.items()?

Oleg Broytmann Oleg Broytmann <phd@phd.pp.ru>
Mon, 17 Sep 2001 12:49:18 +0400


On Sun, Sep 16, 2001 at 02:23:26PM -0400, Chris Cioffi wrote:
> I've created a form with several dynamically named fields.  I can see the
> fields and the data with <dtml-var "REQUEST.form.items()">, but I don't know
> how to access the data within a <dtml-in ...> loop.  How do I access the
> variables?  The Zope book doesn't say and other documentation/examples has
> eluded my searching so far.

   <dtml-in "REQUEST.form.keys()">
      Key: <dtml-var sequence-item>,
      Value: <dtml-var "REQUEST.form[_['sequence-item']]"><br>
   </dtml-in>

   <dtml-in "REQUEST.form.items()">
      Key: <dtml-var sequence-key>,
      Value: <dtml-var sequence-item>,
   </dtml-in>

Oleg.
---- 
     Oleg Broytmann     http://www.zope.org/Members/phd/     phd@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.