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

:: Need a smarty expert on form validation

 
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 -> Help Wanted (commercial)
View previous topic :: View next topic  
Author Message
netmastan
Smarty Regular


Joined: 02 Jul 2004
Posts: 64

PostPosted: Sun Dec 12, 2004 2:50 am    Post subject: :: Need a smarty expert on form validation Reply with quote

I have three pages package.php, booking.php,fares.php. And each has has own form. Form validation behave strange.

I have registered the form and added validation code. It works fine.

But when i go other pages let say booking.php and if i submit the form withought filling the form it shows error that reqauired field is empty which is fine. And once i fill it , the form redraw the form and do nothing.

Then if i go to let say package.php form, it shows error that required fields are empty before even i submit the form. Once i submit it, the form redraw and do nothing.

I i restart the session and first time go to any pages form, it validate and works perfect. Once i go to a other pages form it start the above problem..

I am sorry , if i couldn't explain it.

I will pay good money for it as i need to finish it as soon as i can . This crazy form validation killing me.


if i have just one form in my whole website it works perfect. But if i have mulitiple forms like contactus, booking request then it start doing the problem.


Regards
Back to top
View user's profile Send private message
mohrt
Administrator


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

PostPosted: Sun Dec 12, 2004 4:37 pm    Post subject: Reply with quote

When you initially pull up a form, reset the session data:

SmartyValidate::connect($smarty, true);

If you never use the forms in parallel, you don't need to name them either (just use default)
Back to top
View user's profile Send private message Visit poster's website
joey
Smarty Regular


Joined: 29 Oct 2003
Posts: 57

PostPosted: Mon Jan 10, 2005 3:32 am    Post subject: Reply with quote

for client-side validation,you can use "Formcat" to solve.
_________________
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
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 -> Help Wanted (commercial) 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