Forms in a Lightbox on Non-Marketo pages.

Corey_Bethel
Level 4 - Champion Alumni

Forms in a Lightbox on Non-Marketo pages.

I'm trying to add a form in a lightbox when I click a link on a non-marketo landing page. I can get the form to show in a lightbox when I click the link, but the lightbox will not disapear when the form is submitted. I would also like to replace the form with some "thank you" text, while leaving the lightbox open if that is possible. Any suggestions on how to do this. I've read through the developers documentation but am still having no luck. 

Thanks,
Corey
Corey Bethel
Consultant | Etumos
Tags (1)
4 REPLIES 4
Anonymous
Not applicable

Re: Forms in a Lightbox on Non-Marketo pages.

What approach are you taking? My general way to do this would be to have something listening in Javascript for the form submission and then hide the form.
Anonymous
Not applicable

Re: Forms in a Lightbox on Non-Marketo pages.

Here's a guide from the Marketo developers blog on how to get the lightbox to disappear: 

http://developers.marketo.com/blog/hide-lightbox-after-form-submission/
Corey_Bethel
Level 4 - Champion Alumni

Re: Forms in a Lightbox on Non-Marketo pages.

Erik,

When a user clicks a "Request More Information" link, the form needs to popup in a lightbox. Once the form is submitted, I would like the lightbox to stay open, but the form to be replaced with some "thank you" text. 

I used the Javascript code supplied in the Developers page on Marketo. I can get the form to show up when the link is clicked, but I cannot get the form to be replaced with some "thank you" text. It could be something really simple, but I've just been working on it so long I could easily be over looking something.
Corey Bethel
Consultant | Etumos
Anonymous
Not applicable

Re: Forms in a Lightbox on Non-Marketo pages.

I see. We don't have sample code that covers that case- just the lightbox going away (as Murtza mentions above). It would be possible to do with JS, but you'd to actually replace the form element with that text. It's a little involved so you'd need to be somewhat familiar with jQuery to do it.