[pmwiki-users] fox validation problem

Hans design5 at softflow.co.uk
Tue Jul 15 04:36:25 CDT 2008

Monday, July 14, 2008, 1:27:51 PM, Hans wrote:

> I uploaded updated scripts fox.php and foxedit.php
> to provide correct handling of input validation errors when a page is
> edited through a foxedit edit form.

Yesterdays update was buggy, I am very sorry. I worked on a wrong
copy of fox.php. Now fixed. See

Here is my working version of your blog test form:
I combined it with preview capability. I had abandon (:foxptv ....:)
and use ptvtarget= in th efox markup. Watch out for extra line breaks
in the source code introduced by the eamil software!

%red%(:foxmessages:)(:if foxpreview:)
!!!$[Preview]:           %green%[-– $[Changes have not been saved] –-]

(:fox editform foxedit=1 ptvtarget={$EditTarget} ptvfields=Title,Text1,Author ptvclear=Title,Text,Author:)
(:foxpreviewtemplate "Title: {$$ptv_Title}\n----\nText:\n{$$ptv_Text1}\n----\nAuthor: {$$ptv_Author}":)
(:if expr !foxpreview && !foxcheck:)(:input default source={$EditSource} :)(:ifend:)
(:input text name=$:Title size=80:)

(:foxcheck ptv_Text1 msg='please add text!':) 
(:input textarea class=resize name=$:Text1 rows=10 cols=60:)%red%(:foxmessage editform ptv_Text1:)%%

(:foxcheck ptv_Author msg='please sign as author!':) 
(:input text name=$:Author:) %red%(:foxmessage editform ptv_Author:)%%

(:input submit post Enter:)  (:input submit preview 'Preview':) 
(:foxend editform:)

(:pagetype: Form:)


More information about the pmwiki-users mailing list