Hide modal popup after successful mailing list join

Hi all,

I have a modal popup with a form on the home page of my client site, it opens with some webflow interactions and posts through to mailchimp using logic flow. I would like to hide the popup from future display once someone has joined the list (success message). I’ve tried a few things but nothing seems to work exactly as I’d like. Any help would be appreciated!

Thanks!


Here is my site Read-Only: Webflow - Cookie set Hayworth.co

I think you can try using JavaScript to set a cookie when someone joins the mailing list. Then, every time the home page loads, check if this cookie exists. If it does, it means the user has already signed up, so you can keep the popup hidden.

Here’s a quick guide:

  1. After a successful sign-up, set a cookie using JavaScript: document.cookie = "signedUp=true; max-age=3600; path=/";.
  2. On the home page, check if the cookie is there: if(document.cookie.indexOf("signedUp=") != -1).
  3. If the cookie exists, use Webflow to keep the popup hidden.

This should do the trick.

Hi Kerry,

You can do this with some custom code to suppress it, and use a cookie to track when it’s suppressed for future visits.

I have a similar attributes-based solution here but the suppression is triggered by a click event like closing the modal. What you’re describing here is a bit different with the success message, and more complex.

You might use a mutationobserver to detect the display of the success message?