Forms in a Lightbox on Non-Marketo pages. | Community
Skip to main content
Corey_Bethel
Level 4
September 22, 2014
Question

Forms in a Lightbox on Non-Marketo pages.

  • September 22, 2014
  • 4 replies
  • 1602 views
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
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

September 22, 2014
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.
September 22, 2014
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
September 22, 2014
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 BethelConsultant | Etumos
September 22, 2014
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.