Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

[SmartyValidate] Disconnecting a Control Panel

 
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
NoWhereMan
Smarty Rookie


Joined: 14 Feb 2006
Posts: 15

PostPosted: Thu Feb 01, 2007 8:49 pm    Post subject: [SmartyValidate] Disconnecting a Control Panel Reply with quote

I'm using SmartyValidate as part of my blogging system. I have a central control panel, where every form managed SmartyValidate.

At the moment I register every time I enter a form and unregister/re-register every time I do a POST, the problem is that every panel must be independent (I may want to open two panels in two tabs to have, say, the file uploader, and the entry editor), so I can't just do a disconnect() or I'll wipe the entire data.

Still I MUST disconnect or I'll get "not valid" errors reported even when there are no errors... Situation: I post a blank form, I get an error, I leave the panel, once I re-enter the panel there is a "not valid" error :/

If I consider the fact a user may want to open several instances of the panel in different tabs of his browser I can NEVER know when he'll leaves definitely the panel, and so I can't register.

The workaround is that I re-register the form every time a choose a different panel; as you can imagine, if I open a panel in a new tab, the new validators are registered and the old ones are wiped out (I could use different form IDs, but the I would never know when I should definitely disconnect() )

Sorry for the messy explanation, I hope you'll be able to understand me Very Happy and lend me a hand Smile

PS: smartyvalidate is used for the comment form as well, so yet another conflict Very Happy
_________________
-- FlatPress Flat-file based blog, Smarty-powered
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP