Recent Changes - Search:

PmForm

PmWiki

pmwiki.org

edit SideBar

PmForm

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

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.
  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 PmForm:

Category: Forms
Edit - History - Print - Recent Changes - Search
Page last modified on October 24, 2012, at 10:08 PM
 0: 00.00 MarkupToHTML begin
 1: 00.02 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
 2: 00.02 ReadApprovedUrls SiteAdmin.ApprovedUrls end
 3: 00.31 FPLTemplate: Chain begin
 4: 00.31 FPLTemplate: FPLTemplateLoad
 5: 00.35 FPLTemplate: FPLTemplateDefaults
 6: 00.35 FPLTemplate: FPLTemplatePageList
 7: 00.35 MakePageList pre
 8: 00.35 PageListProtect enabled
 9: 00.35 PageListSources begin
10: 00.35 PageStore::ls begin wiki.d/{$FullName}
11: 00.35 PageStore::ls merge wiki.d/{$FullName}
12: 00.35 PageStore::ls end wiki.d/{$FullName}
13: 00.35 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
14: 00.35 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
15: 00.35 PageStore::ls end $FarmD/wikilib.d/{$FullName}
16: 00.35 PageListSources end count=18
17: 00.35 PageListSort pre ret=4 order=name
18: 00.35 MakePageList items count=18, filters=PageListProtect
19: 00.52 MakePageList post count=18, readc=18
20: 00.52 PageListProtect excluded=0, safe=18
21: 00.52 PageListSort begin
22: 00.52 PageListSort sort
23: 00.52 PageListSort end
24: 00.52 MakePageList end
25: 00.52 FPLTemplate: FPLTemplateSliceList
26: 00.52 FPLTemplate: FPLTemplateFormat
27: 00.55 MarkupToHTML begin
28: 00.59 MarkupToHTML end
29: 00.59 FPLTemplate: Chain end
30: 00.59 MarkupToHTML end
31: 00.60 MarkupToHTML begin
32: 00.63 MarkupToHTML end
33: 00.63 MarkupToHTML begin
34: 00.64 MarkupToHTML end
35: 00.64 now