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" <[email protected]> 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 [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