Issue: Newsletter forms don’t show feedback when an already-subscribed email re-submits; the page refreshes without an error message.
Proposed solution (code-based):
Add JavaScript in Assets/global.js to detect submissions via URL parameter form_type=customer and a non-empty email field, then append an H3 message “You have already subscribed!” to .newsletter-form__field-wrapper.
Add CSS in Assets/component-newsletter.css to style the message (e.g., .newsletter_already_subscribe { color: red; }). Code snippets and a screenshot were provided and are central to the fix.
Theme-specific notes:
Dawn: The original selector using #NewsletterForm–footer may fail due to variable IDs. Using document.querySelector(‘[id*=“NewsletterForm”]’) works; multiple confirmations that this fix is successful. Ensure the script is placed in global.js, not theme.js.
Debut: No built-in translation string for “already subscribed” (only Label, Success, Button Label). A hard-coded input ID example was shared, but the reporter still couldn’t get the message to display; no confirmed Debut fix.
Symmetry: A request for compatible code is pending; no solution shared yet.
Status: Working approach confirmed for Dawn; unresolved for Debut and Symmetry. Discussion remains open.
Summarized with AI on December 13.
AI used: gpt-5.
In the theme language settings, it seems there’s only a post-submit message if someone has NOT subscribed to our mailing list.
But when a subscribed e-mail tries to sign up again, the page refreshes and does nothing and does not give an error message like “You have already subscribed!”
How can I add a “You have already subscribed!” post-message if someone tries to re-subscribe?
Hi @SheetalZadfiya ! Would you happen to have an updated code for the Dawn theme? I tried using the code above to enable the “You’ve already subscribed!” message, but it doesn’t appear to work. Thank you so much in advance!
What theme are you using? This is for Dawn, maybe newsletter form field have different names than in Dawn so you should adjust them to mach or check if in your theme, this monit will work out of the box, in the settings etc.
Hi, sorry, I didn’t use this one, check in theme settings, translate adapt → default theme content → newsletter, is there option for already subscribed message? I have only 3: Newsletter: Label, Newsletter: Success, Newsletter: Button Label so in theme itself there is no option to notify user about existing subscription.
for your try this one and check if it is working, if not I don’t think I will be able to help you more
var live_url = window.location.href;
var result = live_url.includes('form_type=customer');
var input_val = document.querySelector('#Contact_163955177715547d60-email').value.length;
if(result && input_val != 0){
const add_ele = document.createElement("h3");
add_ele.innerText = "You have already subscribed!";
document.querySelector('.newsletter-form__field-wrapper').appendChild(add_ele);
add_ele.classList.add('newsletter_already_subscribe','newsletter-form__message','form__message');
}
@pwfrancis Hi, would you happen to know what code we can use for the Symmetry theme? We’re no longer using Dawn, and it seems like this code no longer works
@SheetalZadfiya Hi, would you happen to have the code for Symmetry theme so that those who already subscribed to our newsletter would see a “You’ve already subscribed!” message? Thank you so much in advance!