[Zope] passing parameters from form to script

Roman Klesel roman_plonemail at lotuseyes.de
Mon Aug 29 08:48:46 EDT 2005


Hello everyone,

I'm dynamically generate a form e.g like this:

<form action="paramtest" method="post">

    <table class="normal">
      <tr valign="top" align="left"
          tal:repeat="item
python:context.Templates.AddressTemplate.propertyIds()">

        <td tal:content="item">bla</td>
        <td><input type="text"
                   name="item"
                   value="" tal:attributes="name item; value
python:context.Templates.AddressTemplate.getProperty(item)">
        </td>
     </tr>
     <tr>
          <td>
              <input type="submit" value="Save">
              <input type="reset" value="Cancel">
          </td>
     </tr>
    </table></form>


How can I process the parameters with the target script? I don't know how
many parameters will be passed to the script by the form. I also don't
know  their names.

I allready tried various things and did some research in the docs and
lists but can't figure it out.

I thougth of stuffing all the values in one list with the :records option
but couldn't it right.

I tried :

<td><input type="text"
                   name="item"
                   value="" tal:attributes="name addr.item:records; value
python:context.Templates.AddressTemplate.getProperty(item)">
        </td>

but this also doesn't work.

Will s.o. please help me to get on the right track?

Greetings

Roman



More information about the Zope mailing list