[Zope] how to avoid a redirect ?

Dylan Reinhardt zope@dylanreinhardt.com
16 May 2003 16:30:13 -0700


When you want to immediately display the results of changing information
in a form, I find it works best when a form submits to itself rather
than to an intermediate target.  Doing this avoids the caching/latency
issue altogether.  

For example:

----------------
<!-- Process changes first -->

<dtml-if is_form_submit>
   Do form processing here...
</dtml-if>


<!-- Draw the form with the latest data available -->

<form target=<dtml-var URL> method=post>
   <input type=hidden name=is_form_submit value=1>
   Form code goes here...
</form>
----------------

HTH,

Dylan