[Zope] reload page after form submission

Stuart 'Zen' Bishop zen@cs.rmit.edu.au
Wed, 1 Dec 1999 11:30:28 +1100 (EST)


> My question is this : is there a more way to submit the form and reload
> the page without making a second method (in my case
> added_announcement_html) to make the calls to the SQL and Redirect
> statements ? My folders are rapidly filling up with these sorts of
> methods and I would prefer to cut down on redundant methods if I can.

It can all be done with one document.

<dtml-var standard_html_header>

<dtml-if mysubmitbutton>
  
  Code to insert stuff into the database

</dtml-if>

<form method="post">
    My form. Note the default action in HTML is the current document

    <input type=submit name=mysubmitbutton value=" Add ">
</form>

<dtml-var standard_html_footer>


-- 
 ___
   //     Zen (alias Stuart Bishop)     Work: zen@cs.rmit.edu.au
  // E N  Senior Systems Alchemist      Play: zen@shangri-la.dropbear.id.au
 //__     Computer Science, RMIT 	 WWW: http://www.cs.rmit.edu.au/~zen