Saturday, April 10, 2010, 4:47:35 PM, ABClf wrote: > 1/ how to get a working preview ? I tried different ways with no > success : every time, the informations are posted and the new page is > created, not previewed. I don't know whether I need a template (and > what would be its content) or not, and I don't know where to write > commands in my form ;
There was a bug in fox.php, which made Fox write PTVs even when 'Preview' was submitted. I fixed this with the latest (2010-04-12) release. For using preview please read here: http://www.pmwiki.org/wiki/Cookbook/Fox#preview You need a Preview buton in the form, and a (:foxpreview:) or (:foxdisplay:) markup in the page where the preview will be shown. You also need a template which specifies what shall be shown. You can set it in the form with markup (:foxpreviewtemplate "template string goes here":) just as you use (:foxtemplate "...":) or with parameter previewtemplate=PageName in th e(:fox ...:) markup directive, to use a template from a different page (it can also be an anchored section of the template page, like previewtemplate=Site.FoxTemplates#form1preview). You probably could use as preview template the same display template you use for displaying the PTV data from a posted page. > 2/ how to make in sort that editing a page created with this form > automatically use this form instead of the usual edit pages (ptv > update ?). You could use FoxEdit http://www.pmwiki.org/wiki/Cookbook/FoxEdit and use a foxedit link which will call your custom form. But you would need to adapt the form so it can be used as a foxedit form. Please look at the form and templates of FoxContacts to see an example. http://www.pmwiki.org/wiki/Cookbook/FoxContacts ~Hans _______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
