[pmwiki-users] fox-question: defining the traget's ptv's

Hans design5 at softflow.co.uk
Thu Mar 18 04:11:56 CDT 2010

Wednesday, March 17, 2010, 10:59:31 PM, Knut Alboldt wrote:

> I thought to reduce the definitions I can the following call to create
> new entries:

> [[#new]]
> (:foxmessage:)
> (:fox entryform put=top target='ID{$DTS}' ptvupdate=1 pvtfmt=hidden 
> redirect=ID{$DTS}:)
> (:include {$Group}.Templates#inputfields:)
> (:foxend entryform:)
> [[#newend]]

> and deleting the [[#entry]]-section, to use the variables defined in the
> #inputfiles-section, but I get an error-message:
> Error: no target specified!

> So I think I haven't got the the meaning of the ptvfmt-option ?

ptvfmt is by default 'hidden', so you don't need  pvtfmt=hidden.
The error is caused, because you got a target but no template for
adding content. I know this is a somewhat misleading error message!
In any case you could use a different form, because you want to add
or update PTVs, not adding content text.
Try this [(:fox ...:) markup on one line]:

(:fox entryform
(:include {$Group}.Templates#inputfields:)
(:foxend entryform:)

By setting ptvtarget= and not target Fox will only try to update PTVs
on the target page, if fields match PTV names, or add PTVs, if they are
named with ptvfields=.
redirect=1 redirects to the target.


More information about the pmwiki-users mailing list