Markup Parameters

The following is a list of all parameters, which can be used inside the (:fox ....:) Fox form directive:

  • formname is a required unique name for the form, which needs to be specified as the first parameter in the fox and foxend markup (:fox <formname> ...:) and (:foxend <formname>:).
Optional parameter foxaction
foxaction=display
the output will be displayed at the page location marked with the (:foxdisplay:) or (:foxdisplay formname:) markup, and will not be saved to the page.
foxaction=copy
Instead of adding content, content will be copied, without any template processing.
foxaction=replace
Instead of adding content, existing content will be replaced with new content. The template will be processed and evaluated.
foxaction=mail
form output will create email message and sent to recipients listed on target page, with help of FoxNotify?.
Options for adding content (the default) or the (:foxadd ....:) markup
put=
a keyword designating where Fox will add the new content on the page. It defaults to bottom of a page or section. (deprecated formerly place=).
put=top
adding content to the top of the page (deprecated formerly #top).
put=bottom
adding content to the bottom of the page (default) (deprecated formerly #bottom).
put=aboveform
adding content above the form; the form must be part of the page, not included. (deprecated formerly #append).
put=belowform
adding content below the form; the form must be part of the page, not included. (deprecated formerly #prepend).
put=above and mark=STRING
adding content above the line with a marker given with parameter mark=STRING.
put=below and mark=STRING
adding content below the line with a marker given with parameter mark=STRING.
put=insert and mark=STRING
adding content after (right of) a marker given with parameter mark=STRING.
put=insertbefore and mark=STRING
adding content before (left of) a marker given with parameter mark=STRING.

Alternatively using markup as marker:

(:foxappend formname:) or (:foxprepend formname:)
two markups used as placement markers for posts to be appended or prepended; these take precedence over the above. Warning : this directive must have a text before the top of the page, either it did not work.
(:foxprepend formname #markername:) or (:foxappend...
extending the above by adding an anchor marker name. Using an input control to choose amongst options, and naming it foxplace, one can post to different markers according to the choosen option, as a way gather votes. See FoxVoting? example.
Options for foxaction=replace, or the (:foxreplace ...:) markup:
put=string and mark=STRING
replace first occurrence of string given with mark=STRING with new content.

Example :

(:fox ReplaceString foxaction=replace put=string target={$FullName} :)
(:foxtemplate "{$$newstring}":)
(:input text mark :)
(:input text newstring :)
(:input submit post 'Post':)
(:foxend ReplaceString :)
put=all and mark=STRING
replace all occurrences of string given with mark=STRING with new content.
put=allplus and mark=STRING
replace all occurrences of string given with mark=STRING with new content, even any STRING found in fox forms.
put=regex and mark=REGEX
replace all occurrences of regular expression given with mark=REGEX with new content, even any REGEX match found in fox forms.
put=marktomark and mark=STRING and endmark=STRING
replace content between two markers in page specified with parameters mark=STRING and endmark=STRING with new content.
put=overwrite
replace all content with new content.
More optional parameters:
template=TemplatePage or template=TemplA,TemplB,TemplC
Fox will use TemplatePage to format the post. GroupName.TemplatePagename is allowed too. See about use of templates at Template Markup. Use template=0 if no template is required. Alternatively fox will use a one-line template string provided with parameter foxtemplate="template string" or in a directive (:foxtemplate "template string":), added between form start and end. A template page specified has priority and overrides any template string given. The template string can be only a single line. For multi-line templates create a template page.
foxtemplate="String"
Fox will use template String.
target=PageName or target=PageA,PageB,PageC
Fox will post to page PageName instead of the current page. GroupName.PageName is allowed too. If a csv list of page names is given Fox will post to each page, using a corresponding template. See Multiple Target Pages.
uptarget=PageName and upload=1
input from a file input box (or several) will be used to upload file(s) to target page. See Upload Files input form
redirect=PageName and redirect=1
After posting Fox will redirect to page PageName. The default is to stay on the current page. redirect=1 will redirect to targetpage, or last in list. redirect=URL will redirect to url string given. Note that you can specify also an anchor to redirect to a page section, and url arguments, if you want to pass on arguments or open a page with a certain action.
cancelredirect=PageName
When using a Cancel button (a submit button with 'cancel' instead of 'post' as the control name) Fox will redirect to PageName. All options of redirect= apply to cancelredirect as well.
foxfilter=filter1,filter2,filter3,..
tells Fox to apply custom filters for preprocessing field values See below.
foxfields=name1,name2,name3,..
can be used to tell Fox which fields may possibly be not set and empty, as happens when using checkboxes. Can also be used as (:input hidden foxfields name1,name2 :).
formcheck=name1,name2,name3,..
will enable javascript checking if any of the fields named are empty, display a warning message and prevent posting till fields have values.
keepinput=1 or keepinput=name1,name2,..
After successful posting all input values or values of named fields will be redisplayed in the fields. Default is that entered values will be cleared from all fields if the post was successful. If the posting was aborted values will be redisplayed.
pagecheck=1
Fox will not post if target page exists.
pagecheck=PageName1,PageName2,..
Fox will not post if any of the named pages exist.
foxcheckmsg=String
Message displayed with markup (:foxmessages:) after an input error raised by (:foxcheck ...:) markup. Default is an error message set by config variable $FoxCheckErrorMsg = 'Please enter valid input!';
foxsuccess=String
Message displayed with markup (:foxmessages:) after successful posting. The target pagename can be added by using a replacement variable like {$$target} or as a link using [[{$$target}(?action=browse)]].
foxfailure=String
Message displayed with markup (:foxmessages:) after failed posting. The target pagename can be added as for foxsuccess above.
if=CONDITION
to add a condition for setting the target inside special markups (:foxadd ...:), (:foxreplace ...:), (:foxptv ...:), (:foxcopy ...:), (:foxmail ...:). If the condition is not met, the target given in the markup will be unset and the markup not processed. CONDITION can be any condition as used in PmWiki's conditional markup, and can include replacement variables like {$$var}, i.e. field name variables.
Parameters for adding and updating PTVs :
ptvtarget=PageName
Fox will replace the value for any PTV on page PageName for which it has an input value from a field with the PTV name. If you need to restrict the PTV update to certain named PTVs, use the next parameter as well. See also Adding and Updating PTVs below.
ptvfields=name1,name2,name3,..
If this is given Fox will only replace values for the PTVs named. ptvtarget=PageName needs to be specified as well.
ptvfmt=text or deflist, or section
Sets format of PTVs for adding new PTVs specified with ptvfields. Default is hidden PTV.
ptvclear=name1,name2,name3,..
On form submission any named fields which are empty (with no value, but not 0) will clear the corresponding PTVs (erasing their values). This option allows empty input on specific input fields. Normally empty input will be ignored, and in order to clear a PTV a special keyword needs to be used. This is defined with variable $FoxClearPTVFmt and defaults to the keyword NULL: input of NULL will clear a PTV.
ptvclear=1
as above, but effective for all input fields saving to PTVs.
ptvupdate=1
Fox will use target page(s) given for ptvtargets, and update PTVs on the target page corresponding to input field names if the page exists, otherwise use a template supplied to create the page. ptvtarget= does not need to be specified.

<< Fox Markup | Index | Input Form Controls >>