[pmwiki-devel] Question about Forms & Actions

The Editor editor at fast.st
Mon Dec 11 04:26:26 CST 2006

On 12/11/06, Hans <design5 at softflow.co.uk> wrote:
> Monday, December 11, 2006, 9:42:40 AM, The wrote:
> > I
> > realized I don't really understand the difference between the action
> > parameter in the form field and the action input field which is set to
> > ZAP, and causes the engine to be called.
> The ACTION parameter of the HTML FORM tag specifies the URL of the server
> side process which is to be used when the data from the form is
> submitted. The server side process we use mostly is pmwiki.php, called
> with {$PageUrl} or {ScriptUrl}
> The action specified often in a hidden form field, for instance
>    name=action value=zap
> is usually associated with Pmwiki's ?action= parameter like
> action=edit. So by submitting a form with a hidden name=action
> value=zap pmwiki will check for a $HandleActions 'zap'  and run the
> function associated with it (ZAPengine).
> So the HTML for pmwiki form use may have something like this:
> <form  action='\$PageUrl' method='post' >
> <input type='hidden' name='n' value='\$FullName' />
> <input type='hidden' name='action' value='zap' />
> ....
> ....
> <input submit ........../>
> </form>
> submitted as $PageUrl?n=$FullName&action=zap&......
> Hope this makes it a bit clearer!

Thanks Hans, that helps.  So theoretically if I implemented Ben's
suggestion, making it possible to set an action parameter in the form
field, one could do both server side processing (say of a cgi script)
simultaneously with whatever zap actions are called.

Anyone know how this might affect the HandleBrowse and/or Redirect
code in ZAP?  That is, are Pm's actions done before the form action?
And if so, would the server action override ZAP's closing actions or
would the server be ignored?


More information about the pmwiki-devel mailing list