One time popup doesn't remember users

Hi ,I’m doing a one time popup using the code in the corvid tutorial ,the goal is to have a popup that users choose the type of client they are,it directs them to secondary lightboxes,where users submit details in wix forms and gain access to the website .

the problem is if you use session storage,the popup always shows again regardless if you’ve succefully submited details or not.
With local storage ,they can close the popup when it first shows,and just go through the website.

how do I get the popup to remember users? And get the popup working as intended ? Thanks!

tutorial

1 Like

Hey Paulo!

Great question - you may want to post this in the Corvid forum for visibility as well :slight_smile:

Hi @paulo

It’s easily doable using code. You can query the database where u store the submitted details of the user when the page or site loads. If the query result is true, that means the user already submitted the data and then u can with code, not show the one time popup. If the result is false you can show the one time pop up. For this to work the user should be logged in so that we know the user Id and use that to query the database. Let me know if u need further help…

Hi Thrishti Labs , that sounds like a good idea,how do I write the code for that? Thanks!

You can check the corvid API to see how to use a query and can use it’s structure to adjust the code according to your needs. Logic is like I mentioned above. If you need extra support do let me know. :smiley:

@thrishtilabs thanks for your response Thrishti. :slight_smile:

@thrishtilabs thanks!!