I saw on the Mailchimp website that you can redirect the user to a custom thank you page when they subscribe to your mailing list, but that's not exactly what I want to do.
When a user subscribe to my mailing list, I want to hide the form and replace it with a thank you note directly on my page without any redirection. Is there a way to do that?
You can do this by modifying the form action.
Change “subscribe/post” to “subscribe/post-json” …
Add a submit handler to the form:
Submit the form via AJAX (Code referenced from Github here):
And then write the code to display the signup confirmation