[Zope] Getting at form variables

Shalabh Chaturvedi shalabh@pspl.co.in
Fri, 26 Nov 1999 00:28:20 +0530


I wanted that a url of the form 'http://url?a=b+c&d=e'
produce a page like:

[----desired-webpage----
You submitted:
  a = b c
  d = e
---------------------------]

I have finally found the following way to do it:-

[----dtml-snip------------

You submitted:

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

Is there a neater/better way? More generally, given a dictionary called
map and a string called key...

<dtml-var map>   prints `{a: 'b c', d: 'e' }`
<dtml-var key>    prints  `a`

...is there a way to get at map[key] through DTML ?
(`b c` in the above example)

<dtml-var map[<dtml-var key>]> doesn't work.


Thanks,
Shalabh