I found exactly what im looking for but unfortunately its for cakephp
1.1.
http://bakery.cakephp.org/articles/view/validation-in-another-controller

I've tried it and it doesnt work in cakephp1.2, any hints on what I
need to change to port it?

On Mar 16, 2:22 pm, calder0n <[email protected]> wrote:
> Hello everyone,
>
> Let's say I have a model called "Activity" and to each activity users
> may add reviews, so I've got a Review model with some validation
> rules. Now, I'm showing a form to add a review from one of my views of
> my ACtivity model. The form calls my add() method in my Review
> controller. Everything works as expected except when the validation
> fails, what I want to do here is to show the validation errors in the
> form but they are getting lost after a $this->flash() that informs the
> user somethign went wrong and takes them back to the previous page.
> What's the best way to accomplish what i want here?
>
> I've been pointed that I shouldnt add a Review model from my acitivty
> view, but now, lets say this was a blog, would you redirect users to a
> whole new page just to add a comment? No, you let them add the comment
> right there.. at the Blog' entry view.
>
> Heres the relevant code:http://www.copypastecode.com/codes/view/4114
>
> Thanks for all your suggestions.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to