[Zope] ZSQL questions

McDonnell, Larry lmcdonnell@protonenergy.com
Tue, 14 May 2002 11:20:19 -0400


Hi,

I saw the light and it works, I misunderstood the form action call. After
re-reading it, I created another dtml doc and it works. Thanks for your
help. I haven't programmed a while so some of the old 3gl mindset is getting
in the way. ;^)

-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Jon
Erickson
Sent: Monday, May 13, 2002 3:31 PM
To: McDonnell, Larry
Cc: zope@zope.org
Subject: RE: [Zope] ZSQL questions


On Mon, 2002-05-13 at 14:06, McDonnell, Larry wrote:
> Hi,
> 
> This was the only way I was able to get this to work.
> 
> <form action="http://proton-80556:8080/intranet/input_test/manage_test"
> method="get">
> input_test is the zsql. 
> 
> I tried this method <form name="form1" method="post" action="input_test">
> but this is where the next thing I see is this zsql method in test mode.
Any
> sugesstions, thanks ahead of time.

Try this:

<form action="form_handler" method="POST">

A very simple form_handler would be a dtml method like so:

----------------------------------------------
<dtml-var standard_html_header>

<dtml-call expr="zsql_method_name(REQUEST)">

<dtml-var standard_html_footer>
----------------------------------------------

When the form is posted (user clicks on submit) the form variables are
stored in the REQUEST object, which you can pass to a zsql method.  You
will need to make sure that the form variable names match that of your
zsql method arguments.

Jon



_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )