Multiple Target Pages

If a list of page names is supplied Fox will post to each page, using a corresponding template page. Use either this syntax:

(:fox formname ... target=TargetPage1,TargetPage2,TargetPage3 
template=TemplatePage1,TemplatePage2,TemplatePage3:)
etc. 

or for more flexibility use special markup (:foxadd ...:), (:foxptv ...:), (:foxreplace ... :) and (:foxcopy .... :), for example:

(:fox formname :)
(:foxadd TemplatePage1=>TargetPage1 ...parameters... :)
(:foxadd template=TemplatePage target=TargetPage ...parameters... :)
(:foxadd TemplatePage3=>TargetPage3 ...parameters.. :)
(:foxptv PTVTarget1,Target2,Target3 ..ptv parameters...:)
(:foxreplace TemplatePage3=>TargetPage3 ...parameters.. :)
(:foxcopy TemplatePage1=>TargetPage1 TemplatePage2=>TargetPage2 .... :)
....other input controls and submit button...
(:foxend formname:)

Specify either a TemplatePage=>TargetPage pair (or several), or template=TemplatePage target=TargetPage parameters.

Template#section=>GroupA.TargetA and a section on a target page: target=TargetPage#section.

Fox generates a list of template and target pairs, processing any (:foxadd ... :), (:foxptv ...:), (:foxreplace ... :) and (:foxcopy ... :) markup first, as found in sequence, and assigns actions and placements and parameters to each, using defaults if necessary. If no parameter is given, Fox will use the previous one used in the markup.

If redirect=1 is set, Fox will, after posting to all the pages, redirect to the last target page. To redirect to another page use redirect=PageName.

By setting several target-template pairs Fox can post different field values to different pages. Field substitutions will be applied generally.

To see behind the scenes how Fox assigns parameters to targets and in what order targets are processed you can set temporarily in fox.php near the beginning: $FoxDebug = 3;
On form submission Fox will echo the target array. Make sure you don't use redirect= though!


<< Filter Functions | Index | Page Text Variables >>