but in save method use second parameter "false", to it won't validate again

$this->Feedback->save($this->data, false);

--
Tilen Majerle
http://majerle.eu



2010/10/21 euromark <dereurom...@googlemail.com>

> i would validate it together
> this is the most comfortable form for a user.
>
> in any case you need to make sure that that you use validate:
> $this->Feedback->set($this->data);
> $res = $this->Feedback->validates();
> $res2 = $this->Recaptcha->valid($this->params['form']);
>
> if ($res && $res2) {
> //save now
> $this->Feedback->save();
> }
>
> On 21 Okt., 10:05, Louie Miranda <lmira...@gmail.com> wrote:
> > On the bin:http://bin.cakephp.org/view/263117079
> >
> > It validates the recaptcha first, before the fields. What I wanted is,
> > validate the fields then recaptcha.
> >
> > I tried to move the codes..
> > if($this->Recaptcha->valid($this->params['form'])) {
> >
> > after if ($this->Feedback->save($this->data)) {, then it worked! but, it
> > validates the fields first, then captcha, but it is already saving the
> data.
> >
> > >if ($this->Feedback->save($this->data)) {
> > >if($this->Recaptcha->valid($this->params['form'])) {
> > > ..............
> >
> > Any workarounds here? How can I validate the fields first, then
> recaptcha,
> > then save the data.
> >
> > Regards,
> > --
> > Louie Miranda
> >  - Email: lmira...@gmail.com
> >  - Web:http://www.louiemiranda.com
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.com>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to