> Because Cake do not save if validation failed and pass validation > errors to view automatically. Form helper render these errors when use > $from->input() method. Yes it does and it works beautifully - but not for input fields that do not belong of the current model.
If my Model1 has only Model1.fieldA, Model1.fieldB and Model1.fieldC and I have a second Model2 with fields Model2.fieldD and Model2.fieldE and I am using Model1/add then, validation errors for Model2.fieldD and Model2.fieldE are not displayed. I looked at the definition of the FormHelper and what I understand is that FormHelper calls the function tagIsInvalid() that returns an array with all the errors of the current model (or: input names). I thought that there might be a way to add the errors of other models to that array, so that cake also displays errors the errors of Model2 and not only Model1. I do not know whether this is the way to do that. How can I generally display errors for an input field if cake does not do it automatically? I did not find anything in the cookbook for FormHelper. Melanie Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
