Resolved. I wasn't triggering the validation in the controller.

On Nov 10, 8:28 pm, Action <[EMAIL PROTECTED]> wrote:
> Also, here is my code:
>
> echo $form->create('Comment');  <------ validation errors work, but it
> sets the action to 'add', which I don't want
>
> echo $form->create('Comment', array('url' => array('controller' =>
> 'posts', 'action' => 'view')));  <----- validation error message don't
> display
>
> On Nov 10, 7:12 pm, Action <[EMAIL PROTECTED]> wrote:
>
> > I'm building a blog and on '/posts/view/post_title_slug' it displays
> > the blog post and an add comment form below it.
>
> > I want it so that if the form data is invalid, it brings you back to
> > the same view (with the blog post and the comment form underneath)
> > with the validation error messages defined using form helper
> > displayed. The problem here is that form helper defaults the form
> > action to 'add', and so far it seems like it breaks if I try to change
> > that (i.e. the validation error messages no longer appear).
>
> > Is there any way to accomplish this without copying everything in my
> > 'view' view to my 'add' view?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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