Forum Academy Marketplace Showcase Pricing Features

Hide Future Popup Checkbox

I have set a popup to appear everytime a user comes to the page but I want to allow the user to hide future popups by checking a box. Ideally this would set a temporary hide of the popup maybe for 4 hours or so. I managed to get it to work for users that are logged on by setting a field in the user data record either true or false depending on whether the checkbox is checked or not. But for users that are logged out, the checkbox does nothing.

Have you tried adding a second conditional state using the boolean value on the user’s profile and using "the current user is logged in? That should solve for the logged in / out issue.

Something like this (adjust logic to match your yes or no / visible or not visible intent):

That works for logged in users and is currently what I am doing but for GUESTS, it proves to be much more difficult because I need to be able to persist that users selection throughout all the pages they visit. So if a guest comes to the site, I show the popup. Then is the user clicks the HIDE FUTURE POPUPS checkbox, and navigates to another page and back to the home page, I want the page to remember that users selection. I may have to set a state on it and send the state data along with the user throughout his stay

If your concern is with a guest during a single session, you could use their IP address. I’d recommend against using states to pass along that data.

A bit more context here:

This topic was automatically closed after 70 days. New replies are no longer allowed.