[pmwiki-users] Need help with Fox (form & template)

ABClf languefrancaise at gmail.com
Sat Oct 4 12:14:32 CDT 2008


Hello everybody,

I'm in trouble with Fox Coobook and I need some (basic) help.
My goal is to build a News Group with a page including form (write, preview
and post) and another page for the template.
And I want all my news pages posted with the form being named :
YYYY-MM-DD-some words.

So, here are my form and my template :

---form post news (using fox)---
(:nogroupfooter:)(:nosections:)

(:fieldset :)

(:fox formactu put=top template=Site.ActusMaquette target={$$nom} redirect=1
keepinput=1 pagecheck=1:)
||width=100% align=left border=0 cellpadding=5 cellspacing=5
||'''Nom fichier :'''\\
(:input text nom size=80 value="{$Today}-":) ||||
||'''Titre actu :'''\\
(:input text titre size=80:) ||||
||'''Date actu :'''\\
(:input text date size=30:) ||||
||'''Résumé actu :'''\\
(:input text sujet size=80:) ||||
||'''Article :''' (:input textarea texte cols=80 rows=30:) ||||
(:include Site.BalisesEssentielles:)
||'''Catégories :'''\\
(:input text cat size=50:) ||||
||'''Source actu :'''\\
(:input text source size=50:) ||||
||'''Posteur :'''\\
(:input text author value="{$Author}" size=30:) {$Captcha} (:input captcha:)
||||
(:fieldsetend:)

(:fieldset :)
||(:input submit preview 'Prévisualiser':) (:input submit post Poster:) ||||
(:fieldsetend:)
(:foxend formactu:)

(:foxpreview:)

---template news---
(:sujet:{$$sujet}:)
(:title {$$date} - {$$titre}:)

>>div1 actu<<
!{$$date} # {$$titre}
posté par : [[~{$$author}]] le {$$(date d.m.Y - H:i)} | [[{=$FullName} |
Lien]]
source : {$$source}
----
[[#texte]]{$$texte}
----
{$$cat}

>>div1end<<[[#fin]]

At this time, my form is ok, and the preview action seems working as
requested (fiels are merged with the template).

But I don't know how to do the Post action work according to my needs : when
I click the Post button, a new page appears, with the {$$nom} as name, and
that's all : the screens asks me to create the page (describe [$$nom} heure)
: the name of the page is the only one data coming from the form, and the
template hasn't been merged (to my mind).
What I need is very basic I guess : I want the new page to be created with
all the data I wrote in the form, merged with the template.
I tried many many tests, changing and changing some parameters (especially
the «target») with no success.
Can someone help me by telling me what's wrong here and what's needed ?

Thank you !

Gillles (gb)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20081004/b8e548aa/attachment.html 


More information about the pmwiki-users mailing list