Quantcast

Sign up for newsletter form on homepage

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Sign up for newsletter form on homepage

iFemke-2
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 [hidden email].
To unsubscribe from this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Sign up for newsletter form on homepage

jeremyharris
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 [hidden email].
To unsubscribe from this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
 
 
Loading...