[pmwiki-users] Forms and redirecting save button

Patrick R. Michaud pmichaud at pobox.com
Sat Feb 24 15:54:05 CST 2007


On Fri, Feb 23, 2007 at 02:14:44PM +0000, Francis Casson 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.

>    Where is the code that the defines the behaviour of e_savebutton and would
>    it be a bad idea to edit it? 

Well, e_savebutton doesn't control where the form ends up -- all
it does is generate an HTML <input type='submit' ... /> tag.
In the case of the edit form in general, it's not the form that
decides where the browser goes... because in order to save the page
the form must be sent back to PmWiki with a special "post" control
set.

What we need to see about adding is a way to tell PmWiki where to
redirect the browser once a post has occurred.

>    More generally, I find the documentation of Cookbook/Input and all the
>    forms stuff very hard to follow - it doesn't explain where the data
>    entered into a form goes.   ...

PmWiki's built-in form markup does little more than make it possible
for authors to create forms -- it was designed simply to make it
easier for administrators to create custom form interfaces to
other existing applications.  PmWiki's core doesn't itself have
any facilities for processing forms beyond the basic edit/post/upload
actions.  (There are some recipes that seem to provide this, however.)

>    Am I right that using the wiki markup for forms
>    requires a complete knowledge of forms in html and interfacing with a
>    database, with knowledge of all the wiki markup on top?

Sort of.  If interfacing with an existing web application of some
sort, then the wiki markup can make it easy to create forms and
embed them in pages.  But if someone wants to build a new
form-based application from scratch, then yes, a bit more
knowledge about databases and transaction processing is needed.

Pm



More information about the pmwiki-users mailing list