[pmwiki-users] Fwd: Forms and redirecting save button

Francis Casson pmwiki at bleaksky.net
Mon Mar 12 09:54:39 CDT 2007


On 24/02/07, Francis Casson <pmwiki at bleaksky.net> wrote:
>
> On 24/02/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> >
> > >    After clicking on the save button on the edit form, it it possible
> > to
> > >    redirect the browser to a different page?
> >
> > At present this isn't possible, but it's come up enough that I may
> > add this capability in the near future.
> >
> > The reason I asked is because I want to redirect the user to a email
> form prompting them to send an email to notify others that the wiki has been
> updated. I don't think Cookbook/Notify is suitable, because I want the user
> to be able to exercise discretion about who to and when to send the emails.
>
>
>
Ah, I see now that $EditRedirectFmt has been added...

Anyway, I preferred just to have a header to the page after editing rather
than a whole new page to be redirected to, so I tried to do it like this:

In config.php:
 $FmtPV['$Posted'] = "'" . $IsPagePosted . "'"; #capture contents of
$IsPagePosted
and I also tried
 $FmtPV['$Posted'] = '$GLOBALS["IsPagePosted"]';

But I couldn't get my new page variable to display anything.  Am I using
FmtPV wrongly?

Then I planned on using (:if Posted true:) in a group header or some other
permanent part of the html template to generate a message (or email form)
after posting. But I'm also not sure of the syntax for the conditional
markup.

Is there any reason why this approach wouldn't work if I could get the
syntax right?  Or is there a way it could it be done with
$EditRedirectFmtby including the page you have come from, plus a
header with the message?

Many thanks,

Francis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20070312/ac067816/attachment.html 


More information about the pmwiki-users mailing list