I’m looking to make a front page that can’t be pushed past until the button has been pressed correctly. Exactly like the image I put in this thread. I don’t want it to mess with what is underneath it. Starting animation on scroll etc.
Is this a webflow interaction I could build or does it need custom code?
If you would like you can also see the site this is taken from at:
A page with only two clickable options is just that. As long as someone is not following an external link or a visited one, they would not have a path to proceed deeper. You might want to look at the Memberships functionality (in Beta) to take the step of protecting content versus just temporarily obscuring it.
To try and understand a bit more. Could I use the membership option to only allow people in the “21 and older” group to continue to the site? If this is the case is the option to make sure that person has to reselect that each time they visit?
As far as I know the membership feature is fairly new to webflow. Definitely new to me.
As Jeff pointed out, Webflow doesn’t offer any real security options outside of memberships ( which requires a sign-up process ) and its password-protect feature. There is no option to do server-side code, so options are limited.
However if I understand what you’re trying to do correctly, I have a solution that works on Webflow hosted sites.
It sounds like you are trying to avoid account creation, but to force users to pass a legal requirement of clicking “I am 21 or over”. or “I accept the terms of use.” I’ve built something similar before for an investment site, which legally requires a similar kind of non-login acceptance.
I built that on top of Webflow’s existing password-based login model, by redesigning the login page so that it contains the user agreement and acceptance button, and hides the regular password form. Clicking that button automatically fills in the hidden password and submits to auth the user.
The advantage is;
Fully webflow hosted, for ease of updates
Users cannot access the page without going through the accept page
No easy way to guess / hack the password, and the password field is hidden.I’d still add a no-hacking clause to the user agreement though as a legal SoP
You can secure static pages, collection pages, or folders
Disadvantage;
You can only have one login page, thus your login will always be this button-click. You can’t have this feature, and also a different folder that uses a regular password login.
You can have multiple secured assets, e.g. a folder, a page, a collection page, but the user will have to click the button for each of those individually. They’ll be asked again.
Internally, you will want to have the exact same secret password for all of those assets, or your script gets more complex for little reason.
Logout realistically happens at the end of the “Session” which to some browsers means when the whole browser ( not just the tab, or the site ) is closed.
No possibility of a logout button, because the cookies are httponly. We cannot delete them with script.
It’s a pretty good approach for the right situations, my clients have found it ideal for their setup but consider that logout requirement carefully. Yours might have different legal requirements.
I intended to build a cloneable of this however the password feature only works with a paid hostng plan, so that was a no-go. Hit me up if you need a programmer to built this out for you.