![Smarty Forum Index Smarty Forum Index](templates/smarty/images/phpbb2_logo.gif) |
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
NoWhereMan Smarty Rookie
Joined: 14 Feb 2006 Posts: 15
|
Posted: Thu Feb 01, 2007 8:49 pm Post subject: [SmartyValidate] Disconnecting a Control Panel |
|
|
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 and lend me a hand
PS: smartyvalidate is used for the comment form as well, so yet another conflict ![Very Happy](images/smiles/icon_biggrin.gif) _________________ -- FlatPress Flat-file based blog, Smarty-powered |
|
Back to top |
|
|
|
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
|