Hello
I have a problem, I would like to validate a model which does not have
a controller.
I'm showing form in EntriesController (not PostsController) so I have
to add _persistValidation to my app_controller.
1. If I use:
$form->create("Post");
then form will be send to /posts/add. It works correct but I don't
want to create PostsController and add action.
2. If I use:
$form->create("Post", array("action"=>"add_post"));
The same problem, but I can change target action now ;-)
3.And finally I found this in cake's book:
http://book.cakephp.org/view/186/options-url
It says:
$form->create(null, array('url' => array('controller' => 'posts',
'action' => 'add_post')));
It is good solution, it works, but... how to display validation's
error on the form?
Thanks for help
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---