Just don't redirect then. The homepage should reload and the validation errors should be shown.
On Tuesday, August 14, 2012 6:59:43 AM UTC-7, iFemke wrote: > > For a client website we want a newsletter sign up on the homepage, but we > can't get this to work the way we want it. > > What's happening so far: > If you add a real email address it gets submitted to the database and the > homepage reloads, displaying a session flash message. > If you add a fake email address or submit the form without typing in a > email address, you get redirected to www.website.com/newsletters/add, > where the validation error is shown. > > What we want is to not get redirected to newsletters/add, but to show the > validation errors (like fill in email address or not a real email address) > on the homepage. > > We have spend the last 2 hours on Google and trying out different things, > but we can't get the right solution, so we hoped you could help us! > -- 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]. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
