Page Text Variables

Fox can add content and also update PTVs on a target page. Content will be added first, PTVs updated last in Fox's processing.
By using the parameter ptvtarget=PageName Fox will update any PTV on page PageName with new input from an input field with the name of the PTV. Fox will update all PTVs it finds matching input field names. It will use whatever format the PTVs got, just replacing the values. It will not create new PTVs automatically, unless the ptvfields= parameter is used, specifying target PTVs.

Using parameter ptvfields=name1,name2,name3,.. will restrict the PTV update to the named PTVs. If the target page has not got a PTV named with ptvfields, it will be created as a hidden PTV.

Using parameter ptvfmt=keyword will create PTVs named with ptvfields and not existing in the target page according to the keyword format:

ptvfmt=text
text list format, as used in the recipeinfo section. Syntax is Name: Value, starting on a new line.
ptvfmt=deflist
definition list format, syntax is : Name : Value , starting on a new line.
ptvfmt=section
anchored section format, syntax is ''[[#name]] multi line value... [[#nameend]]
ptvfmt=hidden
(default, no need to specify this) hidden PTV format with syntax (:Name: Value:)
ptvfmt=extra
custom hidden PTV format defined in foxforum.php with syntax (::Name: Value::)

By default if a field is empty when the form gets submitted, Fox will ignore this field and will not clear any existing value of a PTV with the field name. Instead to clear a PTV you need to input a special string defined with config variable $FoxClearPTVFmt, which is by default NULL. This default behaviour can be changed with the ptvclear parameter:

ptvclear=1
any empty field when submitted will clear a corresponding PTV.
ptvclear=name1,name2,name3,..
any empty field named will clear the corresponding PTV.

To add or update PTVs on more than one target page,

Parameter ptvupdate=1 used in the (:fox formname ..:) markup is for special cases to avoid duplicating target and ptvtarget parameters: With target=PageName template=Template ptvupdate=1 a new page can be created according to the template provided, with PTVs being created through the template and input values. But if such a form submits again to the same page, the template will be ignored and only existing PTVs will be updated. No new PTVs will be added.


<< Multiple Target Pages | Index | Preview Button >>