Welcome Guest, Not a member yet? Register   Sign In
form validation and JS
#1

[eluser]Mitja B.[/eluser]
hello. First i must say very poverfull framework.

Now i have one quetion.

I am using this validation for my form
http://ellislab.com/codeigniter/user-gui...ation.html

is it possible to validate with JS that page will not reload and if is where to read manual or howto?
#2

[eluser]Pascal Kriete[/eluser]
It most certainly is possible, but it's not a CodeIgniter feature. CI doesn't restrict your javascript in any way - it's totally independent. I'm sure there are several approaches to this and everyone has their favorites. I haven't tried this myself, but the jquery validation plugin should do what you're looking for. Give that a shot and let us known how it goes.

Remember to make sure that all of the javascript validation is also present in the php backend.

Welcome to Codeigniter.
#3

[eluser]Mitja B.[/eluser]
ok i understand. I was thinking that this is also part of CI. If is not then i will not use JS validation becouse then i need a separate logic for this and i will have to much code just for validation.

What do you think?
#4

[eluser]JWarren[/eluser]
You can add javascript validation with a minimal amount of code. From a user's standpoint, it is actually very helpful as it can cut down on the number of page loads required if something were to be entered incorrectly.

But as inparo said just make sure that your php validation and javascript validation match.
#5

[eluser]Mitja B.[/eluser]
With minimal amount of code? Jquery validation it is not so small. I want to use CI validation and somehow add it to ajax. But i think this is not possible so i leave this.




Theme © iAndrew 2016 - Forum software by © MyBB