|
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 |
conner_bw Smarty Rookie
Joined: 21 Dec 2007 Posts: 17
|
Posted: Thu Feb 17, 2011 1:48 am Post subject: SmartyValidate Suggestion |
|
|
Hi,
I've been using SmartyValidate for a few years and I am very happy to see it upgraded to Smarty 3. Thanks!
That said, one thing really bugs me and I wish it would be improved.
Let me preface that $form is the 7th param of register_validator(). It also appears in several other functions as $form = SMARTY_VALIDATE_DEFAULT_FORM and always the last param.
The problem is, if I have two or more *different* forms named "default" opened in two or more browser tabs, only the last opened tab will work. All the other tabs are borked.
It took me a while to figure out what was going on, and more hours to try to hack in a solution to a problem I didn't really understand. Of course, after much face palming, the obvious solution is to give a unique name to each $form. But, lets be realistic, it's a nightmare to do this. 7th parameter?! Boooo!
Ideally, SmaryValidator could be improved so that `$this->form` or `new SmartyValidate('unique_name')`, or something that actually works be put in place that makes it easy to declare $form. Know what I mean?
Thank you for your consideration.
Regards, |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Thu Feb 17, 2011 3:16 pm Post subject: |
|
|
You can define SMARTY_VALIDATE_DEFAULT_FORM before loading the validation class if you want to change the value of the default form. However, this won't help with multiple forms in the same script at the same time. |
|
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
|