[pmwiki-users] fox validation problem

Hans design5 at softflow.co.uk
Mon Jul 14 06:53:02 CDT 2008

Monday, July 14, 2008, 12:57:07 AM, noskule wrote:

> I have a problem using form validation. If I try to edit a page with the
> foxedit link validation don't work. If I open the form and klick Submit
> validation works.

> Do you see the problem?

Yes, I see the problem. I need to change both fox.php and foxedit.php,
so a validation error resulting from a foxedit form can be trapped
and the edit form be redisplayed with the validation error message.

At present the error message will show on the target page (the page
you edit), if it got a (:foxmessage:) markup. This is not good
enough, I can see.

I will issue updated scripts shortly, later today I hope.

The edit form called by the foxedit link will need to be named
especially, like (:fox editform ....:) or (:fox editformblog ...:)
having the 'editform' string as an identifyer. That way Fox will know
to redisplay thee dit form with the contents sourced from the target
page. At present it does not know.

One other thing you need to know is about naming of the input fields:

If you use inputs like (:input text name=$:Title :)
PmWiki actually names the field ptv_Title, prefixing ptv_ to the PTV
name used. So for the fox form you need to use these names, like
(:foxcheck ptv_Title ...:) and (:foxmessage editform ptv_Author:)

(I use 'editform' as form name in anticipation of the change I need to
make to fox.php a sdescribed above)


More information about the pmwiki-users mailing list