[pmwiki-users] Cancel option with PmForm?
list_ob at gmx.net
Fri May 15 05:19:43 CDT 2009
Petko Yotov wrote:
["Cancel" button with PmForm?]
>How about something like this in config.php, before including pmform.php :
> if(@$_REQUEST['action']=='pmform' && @$_REQUEST['cancel']>''
thanks, that's the key!
> && @$_REQUEST['successpage']>'')
this can be split - if the successpage is not set or the same as the
current page, it seems to be sufficient to write "$action='browse';"
> Redirect(MakePageName($pagename, $_REQUEST['successpage']));
This should do the job, thanks for the hint. I'm a bit conservative in
using functions I don't know, and I even had problems to understand
Redirect() completely. It took me a while to understand that
FmtPageName('$PageUrl',$pagename); does nothing else than converting
$pagename to the corresponding URL. Isn't that a rather expensive
operation for such a simple task? Not that it would matter, I'm just
>Then, in the template, you set (:input submit name=cancel value="Cancel!":)
>Alternatively, you may add in the template:
> (:input hidden cancelpage Group.Page:)
>and in the above snippet, use $_REQUEST['cancelpage'] instead of
No problem - this is a level where I can continue, thanks!
>> BTW: Will PmForm be maintained in the future, or will development stop
>> since there are other form processors?
>AFAIK PmForm was created *because* there were other form processors (ZAP,
>Fox). There are no plans to kill PmForms at this time.
Good to know. PmForm is "lightweight" and basically does what I need.
Just the documentation contains a bunch of unanswered wuestions.
More information about the pmwiki-users