[pmwiki-devel] Question about Forms & Actions

Hans design5 at softflow.co.uk
Mon Dec 11 04:46:26 CST 2006

Monday, December 11, 2006, 10:26:26 AM, The wrote:

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

I think you are misreading Ben's suggestion:

Ben wrote:
> In the long run you might want to think about providing for an action
> parameter in the (:zapform:) markup, in case people want a form to
> submit its contents to a page other than the current one.

Ben suggested that (:input form action=$PageUrl ...
may be expanded to allow other pages than $PageUrl (the current page)
to be the reference page pmwiki works from.

I suggested using

return "(:input form $ScriptUrl post:)
        (:input hidden n $pagename$u$o:)
        (:input hidden action zap:)
        (:input hidden ZAPkey $x:)";

By providing a hidden field name=n value=$pagename$u$o
you can pass on a different page if you want, setting $pagename to
some other page than the current.

None of this has to do with running other cgi scripts. All this is
running pmwiki.php.

If you want to run some other script you would use in your form tag a
different url than $ScriptUrl or $PageUrl, namely aurl pointing to the
script you want to use (not pmwiki or a pmwiki page).


More information about the pmwiki-devel mailing list