Hide Lightbox After Form Submission

August 21, 2014 | by

Overview

The current lightbox embed code generated by Marketo does not disappear when the form is submitted. It will reload the page after form submission, and the form will appear again. If you would like to create a lightbox that hides after form submission, then please follow the steps below.

How to Guide

1. After creating your form in Marketo, generate your embed code. To do this, click Form Actions, and then click Lightbox as code type. Copy and paste this code into a text editor, so you can edit it in the next step.

Screen Shot 2014-08-20 at 5.32.07 PM

Screen Shot 2014-08-20 at 5.32.23 PM

2. Replace all the code after “(form)” in your embed code with the code below:

3. After step 2, the completed version should look like the code below. The code is now ready to be used on your website.

* This article contains code used to implement custom integrations. Due to its customized nature, The Marketo Technical Support team is unable to troubleshoot custom work. Please do not attempt to implement the following code sample without appropriate technical experience, or access to an experienced developer.