Recent Changes - Search:


Main sidebar



This group is used to document the Cookbook:PmForm recipe. See also the PmForm group.

There are several steps for PmForm to work.

  1. Download and extract it to your PmWiki directory on your server Note: You need to put pmform.php direct into your cookbook/ directory, and Site.PmFormTemplates into your wikilib.d directory.
    • Xes: I don't recommend putting Site.PmFormTemplates directly in wikilib.d because that's part of the upgrade tree and should not be modified by users or recipes. I created my own xeslib.d directory and put Site.PmFormTemplates into it, adding this as the very FIRST line in my config.php:
      $WikiLibDirs = array(&$WikiDir,new PageStore('$FarmD/xeslib.d/{$FullName}'),new PageStore('$FarmD/wikilib.d/{$FullName}'));
      This is how you can create your own lib (library) directory ("lib.d") name for wiki page templates separate from user-overwritten wiki.d files.
    • ChrisK: Any installation of files into wikilib.d also runs into issues with using WikiFarms where the wikilib.d directory may not have permissions allowing it to be written to. It thus seems reasonable to move the Site.PmFormTemplates file to the wiki.d directory.
  2. Modify your local/config.php or other local customization file, enabling PmForm
    • note you also will need a line in your config.php file to define the reference for every unique (:pmform reference:) directive:
      $PmForm['reference'] = 'subject="Email from '.$WikiTitle.'" form=#yourform fmt=#yourformpost';
  3. Create wiki page called Site.LocalTemplates if it doesn't exist already
  4. Modify Site.LocalTemplates, editing the form code creating the form (named #yourform from the config.php line above) and the output format (named #yourformpost from the config.php line above)
  5. Inserting the (:pmform reference:) directive into any wiki page where you want this specific form

Starting points:

  • Basic Email Form - a walkthrough creating a basic email form with honeypot & captcha (by Xes)
  • MailForm - forms for sending electronic mail
  • HoneyPot - filter posts from robots
  • Comments - Add comments to current page, or a comment page
  • Data Forms - Add data to pages

Unofficial user's notes about PmForms:

All relevant pages in the PmForm group:

Category: Forms
Edit - History - Print - Recent Changes - Search
Page last modified on July 02, 2015, at 03:06 AM
 0: 00.00 00.00 config start
 1: 00.02 00.00 config end
 2: 00.10 MarkupToHTML begin
 3: 00.12 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
 4: 00.14 ReadApprovedUrls SiteAdmin.ApprovedUrls end
 5: 00.26 FPLTemplate: Chain begin
 6: 00.26 FPLTemplate: FPLTemplateLoad
 7: 00.26 FPLTemplate: FPLTemplateDefaults
 8: 00.26 FPLTemplate: FPLTemplatePageList
 9: 00.26 MakePageList pre
10: 00.28 PageListCache begin load key=0a4118d634e8fc43b1ab5306ff75e1b2
11: 00.29 PageListCache end load
12: 00.29 PageListSources begin
13: 00.29 PageListSources end count=20
14: 00.29 PageListSort pre ret=4 order=name
15: 00.29 MakePageList items count=20, filters=
16: 00.29 MakePageList post count=20, readc=0
17: 00.29 PageListSort begin
18: 00.29 PageListSort sort
19: 00.29 PageListSort end
20: 00.29 MakePageList end
21: 00.29 FPLTemplate: FPLTemplateSliceList
22: 00.29 FPLTemplate: FPLTemplateFormat
23: 00.51 MarkupToHTML begin
24: 00.55 MarkupToHTML end
25: 00.55 FPLTemplate: Chain end
26: 00.56 MarkupToHTML end
27: 00.57 MarkupToHTML begin
28: 00.63 MarkupToHTML end
29: 00.63 MarkupToHTML begin
30: 00.64 MarkupToHTML end
31: 00.65 now