Recent Changes - Search:

PmForm

Main sidebar

PmWiki

pmwiki.org

PmForm

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 pmform.zip 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
    include_once("$FarmD/cookbook/pmform.php");
    • 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.'" mailto=yourname@example.com form=#yourform fmt=#yourformpost from=myname@myexample.com';
  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.01 00.00 config end
 2: 00.08 MarkupToHTML begin
 3: 00.10 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
 4: 00.12 ReadApprovedUrls SiteAdmin.ApprovedUrls end
 5: 00.21 FPLTemplate: Chain begin
 6: 00.21 FPLTemplate: FPLTemplateLoad
 7: 00.21 FPLTemplate: FPLTemplateDefaults
 8: 00.21 FPLTemplate: FPLTemplatePageList
 9: 00.21 MakePageList pre
10: 00.45 PageListSources begin
11: 00.45 PageStore::ls begin wiki.d/{$FullName}
12: 00.50 PageStore::ls merge wiki.d/{$FullName}
13: 00.57 PageStore::ls end wiki.d/{$FullName}
14: 00.58 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
15: 00.58 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
16: 00.58 PageStore::ls end $FarmD/wikilib.d/{$FullName}
17: 00.58 PageListSources end count=20
18: 00.58 PageListSort pre ret=4 order=name
19: 00.58 MakePageList items count=20, filters=
20: 00.58 MakePageList post count=20, readc=0
21: 00.58 PageListCache begin save key=0a4118d634e8fc43b1ab5306ff75e1b2
22: 00.58 PageListCache end save
23: 00.58 PageListSort begin
24: 00.58 PageListSort sort
25: 00.58 PageListSort end
26: 00.58 MakePageList end
27: 00.58 FPLTemplate: FPLTemplateSliceList
28: 00.58 FPLTemplate: FPLTemplateFormat
29: 00.63 MarkupToHTML begin
30: 00.67 MarkupToHTML end
31: 00.68 FPLTemplate: Chain end
32: 00.68 MarkupToHTML end
33: 00.69 MarkupToHTML begin
34: 00.75 MarkupToHTML end
35: 00.75 MarkupToHTML begin
36: 00.76 MarkupToHTML end
37: 00.77 now