Did you try to load the comments form via Ajax?

Dan

On 5 Ott, 02:19, dixon_ <[EMAIL PROTECTED]> wrote:
> Hi all bakers!
>
> I'm developing just another CMS application to learn the Cake
> framework. Really impressed so far!
>
> I'm implementing a commenting system to my posts on the blog. I've
> associated Comment and Post models correctly and placed the submission
> form in an element that is rendered from the post view, as it should
> (any other suggestions?). Then I've set the form URL action to "/
> comment/add" where I add data to the Comment model and then
> redirecting the user back to the post view. Everything works so long,
> records are showing up and associations are being made etc...
>
> The problem is when a field is invalid while trying to save data in
> the CommentsController. How should I handle this? I cannot redirect
> the user back to the post view to show errors, as we are loosing all
> data in the redirection. I could let it auto render the default view
> for the "/comment/add" action (which just would be a submission form)
> without any Post data, but that just doesn't make sense.
>
> To make my problem short: Can anyone show me examples on how to add a
> comment from a post view, and still be able to show validation error
> messages etc (as in normal cases)?
>
> Cheers from Sweden.


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