Sanford, you wizard. It works amazingly.
Thank you for your help. For modal forms, this should be the top rated comment.
Great, glad it worked!
Hi Sanford, I'm trying to implement this but when I add <script>document.body.className += ' mktoKnownLead';</script> into the Custom HTML for Known Leads HTML Source Editor, it gets translated and saved as:
<script>// <![CDATA[
document.body.className += ' mktoKnownLead';
// ]]></script>
Any ideas?
Does it still execute, though? That's the question.
My apologies, it does work! I was looking at the wrong place. Thanks for this!
Rereading the original thread, I see I was thinking of a very different situation. Thanks Kenny!
Hi Eric,
I'm trying to understand your use case to see if it is similar to mine. Pretty much, if I have a known visitor, I want them to be able to get to the gated content, without the gate. What did this custom HTML do for you?
The custom HTML (and CSS) ensures that that the act of showing the Known Lead HTML in turn hides the entire form.
Hi everyone!
Further to this I'm using pop up forms on a guided template, and I want to do a similar thing with those forms, so when it's a know visitor the form doesn't show, it just goes directly to the asset.
Can anyone help? I tried using this code:
<script>
document.body.className += ' knownLead';
</script>
Then add Custom CSS to the form:
.knownLead .mktoModal {
display: none;
}
But it doesn't work.
My test landing page is here:
http://go.cornerstoneondemand.com/Julz-Test.html
Thanks
Juli
In your case the modal uses a different DOM structure (created by the bPopup plugin).
This CSS will hide the form and modal wrapper (together with the Known Lead HTML above, of course).
.knownLead .b-modal.__b-popup1__, .knownLead .mktoForm {
display: none !important;
}
But I think your goal is slightly different because you don't want to only hide the form, you want to let the person download immediately. Which means your Known Lead HTML <script> block should probably end with
document.location.href="http://go.cornerstoneondemand.com/your.pdf";