AnsweredAssumed Answered

Embedded Form Thank You Redirect

Question asked by James Rubin on Oct 7, 2019
Latest reply on Oct 7, 2019 by James Rubin



We are using an embedded form on our website. We're testing the form in a 3rd-party pop-up, so it's running simultaneously with a mirror campaign on a Marketo landing page. We'd like to redirect the thank you page back to the standard Marketo thank you page. 


Here's the embed code I'm using.



var formEl = form.getFormElem()[0];

var submitEl = formEl.querySelector('button[type="submit"]');


    var loc = document.createElement('A'); 

    loc.href = tyURL; 

    loc.pathname = [loc.pathname,"thank-you"].join("/"); 

    document.location.href = loc.pathname + + loc.hash;


Any help would be appreciated. Thanks. -J