Shopify themes, liquid, logos, and UX
Hi
I'm would like to know how to get the newsletter subscribe form to direct to a page after a successful submission instead of the little message it puts next to the box. Please tell me the code to insert so i can tell it to go to a certain url on successful submission? Also i would like to be able to add a first name option and a submit button instead of the arrow. I'm using the dawn theme. My page is here https://3dcaststore.com.au/
Thanks
Hey @3D-Cast ,
You will need some JS code similiar to this:
<script>
document.getElementById("newsletter-form").addEventListener("submit", function(event) {
setTimeout(function() {
window.location.href = "https://yourredirecturl.com"; // Change this to your URL
}, 500); // Small delay to allow form submission
});
</script>
Please note a few things, Adjust the ID to your form ID. In addition, this is not really recommended for a good user experience if a user signs up for the mailing list and unexpectedly gets redirected. Is there something specific you wanted them to do or get redirected to? A better approach might be to have this form embedded on your store as a sign up form and make it clear that they will be redirected. If you have additional questions or get stuck, you are welcome to send me a DM.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025