Welcome Guest, Not a member yet? Register   Sign In
Validation AlertBox
#1

[eluser]Funky Fresh[/eluser]
Hey Guys,

I have a form which has quite a few fields on it.

When i submit the form and not fill anything in, it hits the validation and comes back and displays all the errors at the top which pushes the html right down.

Is there any way to put the returning error messages into an javascript alertbox, each error underneath the other.

Basically i just use the following code to output errors

Code:
<div align="center" style="color: red; font-weight: bold;">
    &lt;?php echo validation_errors(); ?&gt;
</div>
#2

[eluser]K-Fella[/eluser]
I would advise against using a javascript alert. Instead why not display an error under each field.

See: http://ellislab.com/codeigniter/user-gui...dualerrors




Theme © iAndrew 2016 - Forum software by © MyBB