PmForm /
PmForm
(redirected from PmForm.Installation)
This group is used to document the Cookbook:PmForm recipe.
From PmWiki 2.3.22, the script and the template pages are included in the core, you don't need to download it separately. It is not enabled by default, you still need to enable and configure it, see below.
There are several steps for PmForm to work.
- Configure PmForm
- For PmWiki 2.3.37 or more recent:
- Modify your
local/config.phpor other local customization file, enabling PmForm$EnablePmForm= 1;
- Modify your
- For PmWiki 2.3.22 or more recent:
- Modify your
local/config.phpor other local customization file, enabling PmForminclude_once("$FarmD/scripts/pmform.php");
- Modify your
- For PmWiki 2.3.21 or older:
- Download pmform.zip and extract it to your PmWiki directory on your server
- Modify your
local/config.phpor other local customization file, enabling PmForminclude_once("$FarmD/cookbook/pmform.php");
- For PmWiki 2.3.37 or more recent:
- add a line in your
config.phpfile 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'; - Create wiki page called
Site.LocalTemplatesif it doesn't exist already - 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 theconfig.phpline above) - Inserting the
(:pmform reference:)directive into any wiki page where you want this specific form
If your wiki is sending you email forms with international characters, and the character encoding of the emails is wrong, you may also want to add the following to config.php:
# Fix for Subject header, if international characters: $EnablePmFormMailSubjectEncode = 1; # Fix for message body: $PmFormMailHeaders = "Content-Type: text/plain; charset=utf-8\r\n";
Starting points:
- Forms Markup and Standard input controls to embed input forms into wiki pages
- Basic Email Form with Honeypot and Captcha a walkthrough creating a basic email form with honeypot & captcha (by Xes)
- Comments Add comments to current page, or a comment page
- DataForms Using PmForm to save data on wiki pages
- GDPR Comments Add comments to current page, or a comment page, GDPR compliant
- GDPR MailForm forms for sending electronic mail, GDPR compliant
- HoneyPot Implementing "honeypots" for spam-control in forms
- MailForm Using PmForm to send electronic mail from a form in a page
Unofficial user's notes about PmForms:
- FmtDirectives directives useful when post-processing a form
- FormDirectives directives useful when building a form
- ProcessingDescription sketch of the algorithm used when rendering and processing a form
- Forms related pages
Notes
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.PmFormTemplatesdirectly inwikilib.dbecause that's part of the upgrade tree and should not be modified by users or recipes. I created my ownxeslib.ddirectory and putSite.PmFormTemplatesinto it, adding this as the very FIRST line in myconfig.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.dalso runs into issues with using WikiFarms where thewikilib.ddirectory may not have permissions allowing it to be written to. It thus seems reasonable to move theSite.PmFormTemplatesfile to thewiki.ddirectory.
All relevant pages in the PmForm group:
- Basic Email Form with Honeypot and Captcha a walkthrough creating a basic email form with honeypot & captcha (by Xes)
- Client-Alice
- Client-AliceAdams
- Client-JoesPizza
- Client-Pm
- ClientForm
- ClientTemplates
- Comments Add comments to current page, or a comment page
- DataForms Using PmForm to save data on wiki pages
- FmtDirectives directives useful when post-processing a form
- FormDirectives directives useful when building a form
- GDPR Comments Add comments to current page, or a comment page, GDPR compliant
- GDPR MailForm forms for sending electronic mail, GDPR compliant
- HoneyPot Implementing "honeypots" for spam-control in forms
- MailForm Using PmForm to send electronic mail from a form in a page
- PITS-NewIssue
- PITSTemplates
- ProcessingDescription sketch of the algorithm used when rendering and processing a form
- RSVPList
- SideBar
- Variables
Category: Forms