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

Knut Alboldt pmwiki at alboldt.de
Mon Mar 22 18:28:07 CDT 2010

Hi Hans !

Thanks for your answer, so I could reduce the definitions a bit.

Another question:
Is it possible to eliminate even the ptvfield-parameter ? The names of 
the variables I want to update / add are already defined in the input 
form, so is there a possibility to get the list of vars to be updated / 
added from this input-definitions instead of the ptvfield-parameter ?


Am 18.03.2010 10:11, schrieb Hans:
> 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]:
> [[#new]]
> (:foxmessage:)
> (:fox entryform
>      ptvtarget='ID{$DTS}'
>      ptvfields=Auftraggeber,Ressort,Erscheinungsdatum,Ueberschrift,Redakteur,Status
>      redirect=1:)
> (:include {$Group}.Templates#inputfields:)
> (:foxend entryform:)
> [[#newend]]
> 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.
>    ~Hans

More information about the pmwiki-users mailing list