How can I show a custom thank you message once form is submitted in a lightbox? | Community
Skip to main content
Level 2
July 7, 2016
Question

How can I show a custom thank you message once form is submitted in a lightbox?

  • July 7, 2016
  • 2 replies
  • 2685 views

I have a Marketo form in a lightbox. I'd like to show a custom Thank You message in a hidden DIV once the lightbox form is submitted. So when the lightbox form is submitted the lightbox overlay disappears and a CLASS is added to the hidden DIV.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Dory_Viscoglio
Level 10
July 7, 2016

Matt, if you do a search there are numerous other conversations with this same topic. Here's one from less than 2 weeks ago: Create a custom thank you confirmation message upon the form submission

Level 2
July 7, 2016

Thank you for the reply. The examples in the Community show how to display a Thank You message in the same form lightbox.

These solutions don't address my request. I have a Marketo form in a lightbox. On a successful submit, I'd like the lightbox to close and a custom DIV container that's in my HTML to show via addClass.

SanfordWhiteman
Level 10
July 7, 2016

Give a search in the Community -- I posted this recipe a couple of times just in the past few weeks.

Level 2
July 7, 2016

Thank you for the reply. The examples in the Community show how to display a Thank You message in the same form lightbox.

These solutions don't address my request. I have a Marketo form in a lightbox. On a successful submit, I'd like the lightbox to close and a custom DIV container that's in my HTML to show via addClass.

SanfordWhiteman
Level 10
July 8, 2016

MktoForms2 :: nation.marketo.com/thread/33837

Listen for the form's onSuccess event.  Show the DIV.

Note the demo form doesn't submit: put the code onto your site, or you can fork the Pen and delete the code in the HTML side that stops the submit.