Forum Replies Created
-
AuthorPosts
-
Genius Store SL
Participantperhaps you can hook visibility to the “newsletter” cookie. However this limit visibility to the browser/device where the visitor subscribed.
I posted a JS example about how to change visibility of elements based on that cookie on:
https://www.thenewsletterplugin.com/forums/topic/newsletter-form-submit-button-hide-when-user-is-already-member#post-346888August 5, 2025 at 12:08 am in reply to: Newsletter form submit button hide when user is already member? #346888Genius Store SL
ParticipantYes, it’s possible to hide the Subscribe button (or the entire form) by detecting whether the user has already subscribed — at least partially — using JavaScript. Keep in mind this method is limited to the same browser and device where the subscription was submitted.
Right now, what I know is that after a successful subscription, the plugin sets a cookie (named something like “newsletter”) in the visitor’s browser. You can use this to conditionally hide the form or any part of it, like this:
document.addEventListener('DOMContentLoaded', function () { if (document.cookie.includes('newsletter=')) { const newsletterSection = document.querySelector('.newsletter_section'); if (newsletterSection) { newsletterSection.style.display = 'none'; } } });
simply replace .newsletterSection with the class you want to hide.
This approach helps keep things user-friendly: if someone has just subscribed, the form will automatically disappear on future visits from the same browser.
We’re currently waiting for further details from the plugin’s technical support regarding broader possibilities — for example, querying the user’s metadata when logged in, to check subscription status directly from User metadata (useful if the logged visitor is browsing from a different device or with the “newsletter” cookie expired/blocked/removed).
Also this thread asked something similar, but it looks like the feature reuqest was abandoned
Hope that helps!
-
AuthorPosts