[pmwiki-users] Utility links, Fox forms, and PmForms

Hans design5 at softflow.co.uk
Thu Apr 17 04:58:29 CDT 2008


Wednesday, April 16, 2008, 11:10:08 PM, Randy wrote:

> A typical user interface would provide a modal pop up form to enter  
> the notes. But modal pop up forms don't exist in PmWiki.

I don't know what a modal popup form is.

But if you want a form in a popup window, install
http://www.pmwiki.org/wiki/Cookbook/PopupWindow

and put a link in your sidebar or wherever, like

%popwin%[[Site.PopupForm|Add Note]]

which will call page Site.PopupForm as a popup window.
Create Site.PopupForm something like this example as a Fox form:

(:fullpage:)(:notitle:)
Add a note to [[Profiles.{$Author}]] 
%red%(:foxmessage:)
(:fox frm target='Profiles.{$Author}' foxcheckmsg=' ':)
(:foxcheck comment msg='please add a note':)
(:foxtemplate "{$$comment}":)
(:input textarea comment rows=10 cols=50:)\\
(:input submit post 'Add Note':)
(:foxend frm:)

Obviously adjust the template to what you want, etc.
The first code line (:fullpage:)(:notitle:) works especially for
Gemini, FixFlow and Triad skins,  and you may need to change that for
other skins. It make ssure the page shows without SideBar, TitleBar,
Top and Foot menu bars, RightBar, Header etc as plain content page.

Input errors will leave you in the popup window.
After submit you are still in the PoupForm window, it does not close
automatically on successful posting. I think this is not possible, as
a window needs to be closed manually.

You could add a close window link with markup (:popclose Close Window:)

There is no 'close window' button at present.


  ~Hans




More information about the pmwiki-users mailing list