[Zope] Form action with Python script and arguments

Phillip Hutchings sitharus at gmail.com
Sun Mar 6 21:04:21 EST 2005


On Mon, 07 Mar 2005 04:02:10 +0100, Henk Jansen <burley at zonnet.nl> wrote:
> I have two problems when I want for pass <FORM ...> information into a
> Python Script:
>
> 1) Besides passing the FORM data, I also need to pass an extra argument
> into the Python script that was passed (as <URL>?arg=argval) by the URL.
> A thing like:
>
>      <FORM action=my_py_script(arg=<dtml-var argval>)
>
> doesn't work. Neither does:
>
>      <FORM action="my_py_script(arg=<dtml-var argval>")
>
> What's the proper syntax for passing extra arguments to a Python script
> in a FORM action?

Use an <input type="hidden"> field.
> 2) How do I access the FORM data in a Python script? I've tried "import
> cgi" but a call to cgi.FieldStorage() was met by a message that I wasn't
> authorized to make this call ...

REQUEST.form['var'] iirc.


--
Phillip Hutchings
http://www.sitharus.com/
sitharus at gmail.com / sitharus at sitharus.com


More information about the Zope mailing list