Required Checkbox on Signup

Im using the latest version of the Casper theme on ghostpro.

Is there a way to add a required checkbox to the signup flow?

Need this so subscribers agree to the terms.

1 Like

For a little more context, i will have a members only download page with a list of downloads.

Even something as simple as a required checkbox on the specific page that has to be checked at least once before members can download the files.

Hopefully this makes it a little clearer

One approach here would be to create a custom membership flow. However, this isn’t trivial to implement and would require some effort to customize your theme:

Here’s another solution that you can implement per page. This will only show the file download element after a user has checked a box.

First, create a custom HTML element in the editor. Add this:

<input id="consent" type="checkbox">
<label for="consent">
    <span>☑</span>
    <span>☐</span> 
    I consent
</label>

You can update the “I consent” text to fit your needs.

Then, add your file.

Finally, on the post sidebar, add this CSS to the Code Injection header.

<style>
    .kg-file-card {
        display: none;
    }
    
    #consent {
        display: none;
    }
    
    label span:first-child {
        display: none;
    }
    
    #consent:checked ~ label span:first-child {
        display: initial;
    }
    
    #consent:checked ~ label span:last-child {
        display: none;
    }
    
    #consent:checked ~ .kg-file-card {
    	display: flex;
    }
</style>

Here’s the result:
CleanShot 2023-04-03 at 17.59.00

Note that the file is just hidden with CSS, which means someone could bypass the check by altering the CSS.

1 Like

I though about using a solution like this, but the ability to bypass it, doesn’t work. There really should be a way to add a checkbox to portal sign up flow.

ICYMI. This feature just dropped and may be of interest:

2 Likes