I misread your original post. I think what you need to do is call
render(), not redirect().
$this->render('chartofaccounts');
On Mon, Feb 2, 2009 at 3:40 PM, Mickiii wrote:
>
> Thanks Brian, however if I remove the redirect call it displays the
> view for the function "add", i.e. the add.ctp (w
Oops and also remove this:
} else {
$this->Session->setFlash('Venligt ret
fejlene herunder',
'default', array('class'=>'bad'));
$this->redirect('chartofaccounts');
}
--~--~-~--~~~--
I see what your saying, do this:
if($this->Ledgeraccount->validates()) {
if ($this->Ledgeraccount->save($this->data, false)) {
$this->redirect('chartofaccounts');
}
}
--~--~-~--~~~---~--~~
You received this message because you are subscr
Miles, is that not what the 'url' option is doing?
On Feb 2, 10:54 pm, Miles J wrote:
> Just change the url the form is posting to.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this gr
Just change the url the form is posting to.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
Hang on, I just found this post in the Bakery:
http://bakery.cakephp.org/articles/view/validation-in-another-controller
Does that still apply? Or has there been done anything built in stuff
in the latest version of Cake?
On Feb 2, 9:40 pm, Mickiii wrote:
> Thanks Brian, however if I remove the
Thanks Brian, however if I remove the redirect call it displays the
view for the function "add", i.e. the add.ctp (which doesnt exists),
but I want it to go back to chartofaccounts where the form is, and
then display the errors there.
On Feb 2, 9:30 pm, brian wrote:
> You don't need to redirect.
You don't need to redirect. When you do so, the information stored in
$validationErrors is lost because you're making a new request. If you
remove the redirect() call, Cake should simply re-display the form.
Then if all is working well, FormHelper will take care of printing the
errors for you.
On
Hi,
This is probably simple, but I can't find any specifics on it.
I have a controller called ledger_controller, which uses two models:
Ledgeraccount and Ledgertransaction. Within this controller i have a
function called chartofaccounts, which includes a form, with an action
that leads to the le