AnsweredAssumed Answered

Passing a content ID or URL to a lightbox form in a button

Question asked by Grégoire Michel on Mar 15, 2017
Latest reply on Mar 16, 2017 by Sanford Whiteman

Here is the usecase:


In a document library, we want to have "download" buttons aside of each document (there are many). The form is unique all along the page. When a lead hits the button the lightbox embedded form pops up, but we need to pass the document ID or URL to the form so that it is captured in a hidden field and sent to Marketo, which will be able to send the appropriate download link.


The code we are using is typically this one:


<script src="//"></script>

<form id="mktoForm_9999"></form>

<button class="lightboxButton" onclick="

    MktoForms2.loadForm('//', '999-XXX-999', 9999,

    function(form) { MktoForms2.lightbox(form).show(); });">Download</button>

Has anyone done this?


Thanks in advance for your help.