[Zope] Iterating over REQUEST.form

Diny van der Donk dvg@vet.uu.nl
Wed, 23 May 2001 12:09:53 +0200


At 09:05 AM 5/23/01 +0100, David Legg wrote:
>Hi all,
>
>I'm sure somebody more clever than me can work this out. I'm getting results
>back from a form (checkboxes), so I never know how many items I am going to
>get back. What I want to be able to do is iterate over the contents of
>REQUEST.form to be able to process each item, no matter how many results I
>get from a form. Is there a way of doing this (I'm definitely sure there is
>but I'm not seeing it), or perhaps there is a better way.
>

I found this in the mailing list archives for you. Thanks to Tom P.

<ul><dtml-in "REQUEST.form.keys()">
     <li><dtml-var sequence-item> values:<ul>
     <dtml-in "REQUEST.form[_['sequence-item']]">
             <li><dtml-var sequence-item><br>
     </dtml-in>
     </ul>
</dtml-in>
</ul>

Regards,

Diny

DIVA, Faculty of Veterinary Medicine
Utrecht University,  The Netherlands
http://www.vet.uu.nl