I have some files and want to restrict the download to only users who select an option box (not checked by default). I know I can’t do this in HTML and don’t want to do it with server side programming. I am not trying that hard to restrict the download, I just want them to at least acknowledge and be aware there there are terms of agreement.
So basically, if option box checked, then link(s) can be download. If option box not checked, then files can not be downloaded (at least not with the direct link).
Hmmm, well then that would be easier. HTML or JS would be good for me. Like I said, nothing to sophisticated. I just want to remind the user that there are conditions.
Thanks a lot Paul. This is pretty close. What I would like to do is have 1 check box that allows access to multiple files. Would I need a form for each “link”? For example, this is what I would like:
Checkbox (Yes/No)
Link 1
Link 2
Link 3
If checkbox = Yes, then all links are available. If checkbox=no, then no links are available.
I’ve updated the codepen to handle multiple links with one checkbox:
It’s pretty straight forward if you understand the check box hack so just refer to the html and css in the codepen. If anything is unclear then just ask.