Re: add lightbox video in landing page template

dariusa88
Level 1

add lightbox video in landing page template

Hi,

I was wondering if anyone in the marketo community knows how to code a button which pops up a lightbox which will display a youtube / vimeo video? I wiould like to add this code to the landing page template.

 

thanks

9 REPLIES 9
SanfordWhiteman
Level 10 - Community Moderator

Re: add lightbox video in landing page template

That's a very broad requirement — certainly something like Boostrap's modal (or any library/framework's "modal" or "lightbox" module) can be used in this way. I'd advise you to choose the look-and-feel you need from the libraries out there. A Marketo (Guided) LP supports any layout you want.

Tracy_Boesken
Level 4

Re: add lightbox video in landing page template

Hi, I have the same question. I have (in this case) Vimeo embed code...but where do I place the code in the Marketo's form's button? My goal is to have the video play/lightbox when the form is submitted.

 

Thanks,

--Tracy

SanfordWhiteman
Level 10 - Community Moderator

Re: add lightbox video in landing page template

You’d need to add the code that initializes the player in an onSuccess listener.

Tracy_Boesken
Level 4

Re: add lightbox video in landing page template

Thanks Sanford, I got this far by combining articles I read, but it isn't working:

 

<script src="//info.edifecs.com/js/forms2/js/forms2.min.js"></script>
<form id="mktoForm_4390"></form>
<script>MktoForms2.loadForm("//info.edifecs.com", "183-PWY-190", 4390){
//Add an onSuccess handler
form.onSuccess(function(values, followUpUrl) {
// Take the lead to a different page on successful submit, ignoring the form's configured followUpUrl
location.href = "https://player.vimeo.com/video/617208817?h=89542b1b4b&title=0&byline=0&portrait=0&speed=0&badge=0&autopause=0&player_id=0&app_id=58479/embed";
// Return false to prevent the submission handler continuing with its own processing
return false;
});
});
;</script>

 

suggestions?

Tracy_Boesken
Level 4

Re: add lightbox video in landing page template

Tracy_Boesken_0-1633024697241.png

Actually, it appears there is a privacy issue so it won't succeed anyway.

 

Jo_Pitts1
Level 10 - Community Advisor

Re: add lightbox video in landing page template

@Tracy_Boesken ,

if you have rights to the video, I presume you can control those privacy settings. 

Regards

Jo

Tracy_Boesken
Level 4

Re: add lightbox video in landing page template

Someone else in the company does. I'll check, thanks.

SanfordWhiteman
Level 10 - Community Moderator

Re: add lightbox video in landing page template

That code will redirect the entire page to that Vimeo URL, not put the embed in a modal.

Tracy_Boesken
Level 4

Re: add lightbox video in landing page template

Hi Sanford, 

I misunderstood the original ask. What he wants is:

"...a way we can embed the video on LP and it plays only after form is filled?

Form can be on top of thumbnail or message can popup asking to fill the form."

 

Tracy_Boesken_0-1633097866995.png

Currently, I have the "watch now" button with the vimeo follow-up url. The way he has the thumbnail placed in the landing page the video starts playing on the landing page.

How do you suggest I achieve what he is asking for?