Hello Julie, like Charlie said, it requires a bit of scripting added to the landing page but it's pretty straightfoward. If you have access to someone with scripting experience or if you want to take a stab at it, please see below. We currently have several landing pages with an embedded form hosted within an iframe and this code seems to work great. I'm sure there are other options out there but the script below works well for us.
1. Edit and add an html element to the Marketo landing page where your form is currently sitting (page hosted in the iframe) and
2. Edit the newly added html element and add the following code:
<---- code starts here --->
<script type="text/javascript">
// setup jQuery.noConflict
if ( typeof $jQ == 'undefined' ) { var $jQ = jQuery.noConflict(); }
$jQ(document).ready(function() {
/* process the form return to parent window*/
// Marketo form
$jQ('.lpeRegForm').attr('target', '_top');
$jQ("input[name='returnURL']").attr('value','replace with thank you url here');
$jQ("input[name='retURL']").attr('value','replace with thank you url here');
});
</script>
<--- code ends here --->
3. Replace 'thank you url here' with the actual redirect url, including http://
4. Approve your landing page
5. Test, test, test! Happy ifram-ing
Basically you're changing the target attribute of the form to "_top" instead of "_self", which is the default. Keep in mind, this script will work as long as the user has Javascript enabled in their browser.
The script also works well if you want to open a pdf once the form is submitted instead of redirecting to a thank you page. The url specified in the code will take precedence over the url value entered in the form's settings.
Best,
Antonio