[Zope] Newbie Q: creating a Z class from a web form

Howard Richardson howard@city.ac.uk
Fri, 09 Mar 2001 11:07:00 +0000


I'm trying to set up a fault database using Zope, but having no
experience with it learning is proving tricky! Here's my problem.

I've set up a ZClass called faultItem, and the constructors required to
add a faultItem to a directory using the management interface. This
works fine - I get a form to fill in and all the values get set up in
the new instance.

Now I'm trying to do a user end web-form method, so users can do the
same, but I can't work out how to get my properties from my web form
into the new instance. I've read tutorials and how-tos but I still can't
work it out!

Here is my faultItem method that the web form calls:
<HTML>
<HEAD><TITLE>Added Fault Item</TITLE></HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<dtml-call "REQUEST.set ('id', ZopeTime ().strftime ('%Y%m%d%H%M%S'))">
<dtml-with "manage_addProduct[ 'faultItem' ]">
<dtml-call "faultItem.createInObjectManager(REQUEST[ 'id' ], REQUEST )">
</dtml-with>
<h3>Thank You for your fault report!</h3>
</body></html>


What extra code would I need to transfer the values from the request
form into the new instance with the id matching the ZopeTime?

Many thanks,

Howard Richardson,
IT Officer,
City University Library,
London.