Welcome Guest, Not a member yet? Register   Sign In
After a form validation..
#1

[eluser]julgus[/eluser]
I have a form validation which works great. After the validation I need to check entered data usinga a database search. If the searchs fails, the forms is not valid and need to be reentered/edited.

Can I :
- Use the form validation passing a function as an argument to be a part of the form valdiation?
- Or can I manually add data to the validation_errors() function which will show the error encountered in the database search?

Regards
Johan, Sweden
#2

[eluser]OES[/eluser]
All you need to do is use a custom callback.

See the form_validation user guide. (http://ellislab.com/codeigniter/user-gui...#callbacks)

It will do what you want.

Good Luck
#3

[eluser]julgus[/eluser]
Thanks - I just located it in the manual...
Regards
Johan




Theme © iAndrew 2016 - Forum software by © MyBB