Fox Markup

Fox can be applied in numerous ways, but basically it provides special markup to replace the (:input form ..:) and (:input end:) directives while using all the other (:input:) directives (see PmWiki.Forms), and processing the submitted form input for formatted output to some page(s) or location.

Start of form:

(:fox formname [foxaction=keyword] [put=keyword] [template=PageName]
....[target=PageName] [ptvtarget=PageName] [redirect=1] :)
See Markup Parameters for full list of possible parameters.

Various optional other fox markup directives (see below).
Various (:input ...:) form controls including a form submit button.

End of form:

(:foxend formname:)
The fox form name needs to be specified in the end directive.

In addition to the start and end fox markup you can use some special markups in between. Each of these can be used multiple times, and Fox will build a list of target pages with associated templates and other parameters included in each markup. If you use any of these markup directives, then do not use target or template parameters in the (:fox formname ...:) markup!

(:foxadd ''TemplatePage=>TargetPage'' ... :)
for adding content.
(:foxreplace ''TemplatePage=>TargetPage'' ... :)
for replacing content.
(:foxcopy ''TemplatePage=>TargetPage'' ... :)
for content copying (no variable replacements). Note that only the template gets copied as content. Any page attributes of the template page are ignored!
(:foxptv TargetPage ptvfields=.. ptvfmt=.. ptvclear=.. :)
for adding and updating PTVs (page text variables)
(:foxmail template=EMailTemplate target=EMailList :)
for sending email message to small group of recipients on EMailList (needs FoxNotify addon installed).

Page sections can be used for templates as well as targets, like DisplayTemplates#topic and TargetPage#section, and full page names can be used, as well as multiple TemplatePage=>TargetPage pairs (read more about multiple target pages).

(:foxtemplate "one line template string":)
for forms needing no multiline template. The foxtemplate markup will be used if no template pages are specified. You can only use it once in a form. It is convenient for quick and short templates. Note that \n will create a line break.
(:foxpreviewtemplate "one line template string":)
optional alternative template for preview invoked by a Preview button.
(:foxcheck name .... :)
setting input validation checking for input field name. See Input Validation

Markup for including a Fox form specified on another page

(:foxform source:)
source can be a page name like Site.MyEditForm or a page section defined by anchors like SomePage#contactform. If source is a plain anchored section without page name, like #editform, the section will be retrieved by default from page Site.FoxForms or page(s) given in the config variable $FoxFormsFmt. $FoxFormsFmt can be an array of page names. The first section found with the name will be used.
Use of (:foxform source:) markup is encouraged, as the alternative (:include <source>:) markup drops replacement variables, which might be present in the form (See Enable Undefined Template Vars).

<< Installation | Index | Markup Parameters >>