Is there a way to grab / view the errors from a form.

 

Let me explain. 

My forms get sent ajax and all my forms are elements so when submitting a
form all I need to update is the form itself, not the whole view. 

JSON response success: function (response.html) in the scripting returns the
form element back into its <div id="myFormHere">response html which is just
the form element</div> with the errors on the form if any as normal.

 

But if there was a way to simply grab the errors collected from cake for the
field and simply use the js to add the error class and message to the
appropriate field that would be much easier. 

There would be no need to return an element cutting back on the overhead.

 

Basically if there was a method to grab errors for each field something like
this:

 

Errors = array(

                User = array(

                                Field = array(

                                                Name = city

                                                Message = Please enter your
city

                                                )

                                )

                );

 

I could simply add the error message / class to each field.

Maybe there is a way already but I could not see anything other than the
list of error messages.

 

Thanks guys,

 

Dave

 

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to