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

Matt_Brodersen
Level 1

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

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.

5 REPLIES 5
Dory_Viscoglio
Level 10

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

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

Matt_Brodersen
Level 1

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

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 - Community Moderator

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

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

Matt_Brodersen
Level 1

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

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 - Community Moderator

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

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.