[pmwiki-devel] Question about Forms & Actions

Hans design5 at softflow.co.uk
Mon Dec 11 04:15:41 CST 2006

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 ........../>

submitted as $PageUrl?n=$FullName&action=zap&......

Hope this makes it a bit clearer!


More information about the pmwiki-devel mailing list