gated content | Community
Skip to main content
November 16, 2016
Question

gated content

  • November 16, 2016
  • 1 reply
  • 2285 views

can someone help me with setting gated content on landing page with login credentials?
thanks in advance

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
Level 10
November 17, 2016

That may be the worst code I've ever seen (and it offers no actual protection).

EDIT: It appears the post with the code I was referring to has been removed by the poster. That's for the best, thanks.

SanfordWhiteman
Level 10
November 17, 2016

Zero security isn't really a starting point for anything, and that code encourages about 5 different worst practices.

Create a lead field LastGatedContentPassword. Add it to a form. Add a choice for Follow-Up URL that sends them to the asset on a match, to a failure page on a non-match. This stores the password on the server so it can't be read by the lead. You're adding only basic security, but it's a non-negligible barrier (while putting the password right in the HTML source is no barrier at all).

You don't even need any code for this -- and I'm a coder. (JavaScript can be used to enhance the form by changing the password field to a type=password with asterisks, but it'll work fine without that. And as this is only a casual passcode that's probably not necessary.)