[pmwiki-users] fox: input textarea; not able to set ptvfmt

noskule noskule at gmx.net
Mon Jan 19 14:22:44 CST 2009


Hans schrieb:
> Monday, January 19, 2009, 1:23:10 PM, noskule wrote:
>
>   
>> While  migrating all my fox forms to the newest version I noticed that
>> ptvfmt don't work anymore. Heres the part:
>>     
>
>   
>>     (:input textarea name=$:Summary cols=43 rows=3:)
>>     (:foxptv {$EditTarget} ptvfields=Summary ptvclear=Summary 
>> ptvfmt=section:)
>>     (:foxcheck ptv_Summary msg='please add a 
>> summary!':)%red%(:foxmessage blog ptv_Summary:)%%
>>     
>
>   
>> What happens is, that ptvfmt is "hidden" no matter what I define with 
>> ptvfmt.
>>     
>
>   
>> I figured out that if works with fields which don't use name=$:XXX. But
>> in textarea fields this is the only way (I know) where I'm able to 
>> preload the default values.
>>     
>
> this works for me (posting a ptv to same page,
> and displaying ptv in text edit form):
>
> %red%(:foxmessages:)%%
> (:fox blog:)
> (:input default source={$FullName}:)
> (:input textarea name=$:Summary cols=43 rows=3:)
> (:foxptv {$FullName} ptvfields=Summary ptvclear=Summary ptvfmt=section:)
> (:foxcheck ptv_Summary msg='please add a summary!':)
> (:input submit post:)
> (:foxend blog:)
>
> first Summary ptv is created as an anchored 'section',
> subsequently this is updated.
>
> I assume you have
>
> [[#name]]
> ...
> [[#nameend]]
>
> defined as ptv (so $:Summary can see it)?
>
>
>
>   ~Hans
>
>   
oky I found the problem. It's the foxheader: I wrote there:

   (:fox blog ptvtarget={$EditTarget} ptvfields=pagetype ptvfmt=hidden 
redirect=1:)

so fox seams to overwrite all further definitions of ptvfmt in the 
following foxptv markups . ... I don't no if this the plan but I can use 
a foxptv for the pagetype.

By the way, in your example you used {*$FullName} . .  is there a 
difference if I use {$EditTarget} |{$EditSource} or {*$FullName} for the 
target. What's the difference respective the best to use.

ben|












More information about the pmwiki-users mailing list