Re: Form Thank You Page - External URL In New Window?

Anonymous
Not applicable

Re: Form Thank You Page - External URL In New Window?

I see what you're saying. Our dev team also told us the same thing and we proceeded with the form redirecting to the PDF and navigating the user away from our site in this case because of the pop up issue. So we actually never solved this thread.

SanfordWhiteman
Level 10 - Community Moderator

Re: Form Thank You Page - External URL In New Window?

The solution is in the other thread.

Anonymous
Not applicable

Re: Form Thank You Page - External URL In New Window?

Thank you, we are trying to implement that now. Do you know if there is a way to change the dimensions of the lightbox and add a heading above the form but within the lightbox?
Anonymous
Not applicable

Re: Form Thank You Page - External URL In New Window?

with Javascript sure, anything is possible.  my preference is to use jquery selectors ...something like this.....
adding CSS:
$( "#IDofLightboxDiv" ).css("width",90px);

adding a header to a specific container
var header = "<h2>This Is my Header</h2>";
$(
"#IDofContainerDiv" ).prepend(header);

 
Diego_Lineros2
Level 7

Re: Form Thank You Page - External URL In New Window?

This has always been solid for me, the reload is to close the lightbox in the original window. or you can replace the reload with $('.mktoModalClose').modal('hide');

<script src="//app-sj07.marketo.com/js/forms2/js/forms2.min.js"></script>

<script>

function Form() {

MktoForms2.loadForm("//app-sj07.marketo.com", "0000-TDW-0000", 0000, function (form){MktoForms2.lightbox(form).show();

form.onSubmit(function (){window.open('', 'myWindow');

});

form.onSuccess(function(values, followUpUrl){window.open('www.google.com', "myWindow" );

location.reload();

return false;     

        });

});

}

<script>

-----html-----

<button  onclick="Form();">View</button></h1>

</div>

SanfordWhiteman
Level 10 - Community Moderator

Re: Form Thank You Page - External URL In New Window?

Yes, that uses the same pattern as in the solution, although you don't need the second window.open once you have a reference to the window.

Diego_Lineros2
Level 7

Re: Form Thank You Page - External URL In New Window?

Forgot to mention

IMPORTANT! to avoid pop up blocker, do not use "If known visitor show custom HTML"

In the example i did put "google.com" but you must use a Marketo LP (same domain), and if you want to go to somewhere else you must redirect it.

SanfordWhiteman
Level 10 - Community Moderator

Re: Form Thank You Page - External URL In New Window?

There's no such restriction, Diego.  As long as you follow the correct pattern you will avoid pop-up blockers regardless of whether the Thank You URL is on an external URL and/or whether you use KL HTML.

See the existing demo MktoForms2 :: Thank You New Window