Every page has the sign-up.
PageA
PageB
PageZ and everything in between.
So sign up click and request goes to newsletters_controler / add so if it
saves I have redirect referrer so presto back to where I started. If not I
get the session flash error message back where I was but the form has no
errors hilighted saying why failed.
-----Original Message-----
From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of John Andersen
Sent: February-04-10 4:16 AM
To: CakePHP
Subject: Re: Form in element
If I understand you correctly Dave, then you have a page A on which is a
newsletter signup form. When the user submits an e-mail address, you want to
present the user to page B if the e-mail address is valid. If the e-mail
address is not valid, stay on page A. Correct?
Assuming I am correct :) ... in the controller receiving the newsletter
signup submit - if the e-mail address is valid, redirect the user to page B.
If the e-mail address is not valid, redirect the user to page A, using
$this->referer() as the redirect address.
Enjoy,
John
On Feb 4, 4:03 am, "Dave" <make.cake.b...@gmail.com> wrote:
> I have a form in an element and wondering how to return back to the
> page it was sent from if its successful or if there are errors display
> the errors on the same page.
>
> Basically its a side menu and at the bottom a mini form to signup for
> newsletter which is on every page. So if the user adds their email and
> saved success im still on that page...not newsletters/index and if not
> successful same page but with errors.
> (not using ajax and not an option)
>
> Thanks,
>
> Dave
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+unsubscribe@googlegroups.com For more options, visit this group
cake-php+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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment