Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

how to handle multi-forms in SmartyValidate

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
joey
Smarty Regular


Joined: 29 Oct 2003
Posts: 57

PostPosted: Tue Feb 22, 2005 2:02 pm    Post subject: how to handle multi-forms in SmartyValidate Reply with quote

how to handle multi-forms in SmartyValidate ?

Code:

SmartyValidate::connect($smarty);
SmartyValidate::register_form('frmUpload',true);


are those right?
but can't run as my expectation.

I got two form in different pages. one form which validated by SmartyValidate , and there's a link to open the other form which validated by smartyvalidate ,too.

due to the first form has registered as "default" . the other form which opened by the first form can not run . I think the sessions are mixed.

how to solve
[/code]
_________________
Joey
Senior Developer & Designer
-------------------------------------------
http://www.propagator.net
[SourceForge Project] Formcat with Smarty!
http://www.propagator.net/formcat/
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Tue Feb 22, 2005 4:51 pm    Post subject: Reply with quote

Make sure you pass the form name for the second form for everything. On the PHP side:

SmartyValidate::isValid($_POST,'myform');

And in the template:

{validate form="myform" ...}
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    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