Only Show Form To New Users

Hello Webflow Community,

I’m wondering if anyone knows or could point me in the right direction in order to have a form that is only displayed to new users and hidden for existing, so they don’t see the popup everytime they go back to the page with the form?

Any assistance is greatly appreciated.


1 Like

Hi Tony!

To make something like this possible you will need to add some custom code and to interact with localStorage.

First of all, it is need to go to project settings -> custom code -> footer code

and add custom code like the following:

if (document.getElementsByClassName('myform') && document.getElementsByClassName('myform')[0]) {
  if (Boolean(localStorage.myFormFlag)) {
  } else {
    localStorage.myFormFlag = true;

where myform is the class that is added to element, that needs to be shown to user only once (in my case text My form):

then if users will go to the site they will see it only once while visiting:

This method will work as long as the user is using the same browser on the same machine.


Thank you soo much for the responsive response. Will definitely give this a shot