[Zope] newbie in python script

CY cyhoong at pc.jaring.my
Sun Oct 12 23:21:32 EDT 2003


Hello there

I am trying to learn how to pass variables from a data entry to a python
script for processing.

I appreciate if you can explain my error below  or point me to some form
processing python scripts.

Note: I had read the Examples that came together with zope.


TQ in advance.


Error Message
============
Site Error

An error was encountered while publishing this resource.

Invalid request
The parameter, f_name, was omitted from the request.

Make sure to specify all required parameters, and try the request again.


Data Entry Form
==============
<form action="addEntry_ps" method="post" enctype="multipart/form-data">
<table>
    <tr>
       <td>Your Name:</td>
       <td><input type='text" name="f_name" value="" /></td:>
   </tr>
    <tr>
       <td>Your Phone:</td>
       <td><input type='text" name="f_phone" value="" /></td:>
   </tr>
    <tr>
       <td>Your Comments:</td>
       <td><input type='text" name="f_comments" value="" /></td:>
   </tr>
    <tr>
       <td><input type="submit" name="submit" value="Cancel" /></td:>
       <td><input type="submit" name="submit" value="OK" /></td:>
   </tr>

</table>
</form>


python script
==========
# test code: addEntry_ps
# parameter list: f_name, f_phone, f_comments

# Import a standard function, and get the HTML request and response objects.
from Products.PythonScripts.standard import html_quote
request = container.REQUEST
RESPONSE =  request.RESPONSE

# Return a string identifying this script.
print "Hello",'"%s"' % (f_name )

return printed





More information about the Zope mailing list