SOLVED

Re: Using a token for a form follow up page

Go to solution
Anonymous
Not applicable

Re: Using a token for a form follow up page

Hi Sanford,

Sorry for the confusion. Here is the script we used (see below). We placed it inside an HTML element on a Marketo landing page.

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

<form id="mktoForm_1063"></form>

<script>MktoForms2.loadForm("//app-sj17.marketo.com", "245-OLL-135", 1063, function(form) {

    // From here we have access to the form object and can call its methods

    

    //Add an onSuccess handler

    form.onSuccess(function(values, followUpUrl) {

   

    // Email address & unsubscribe url

      var EmailAddr = values.Email;

     var UnSubEnUrl= 'https://secure.cst.org/secure/en/!cstweb.event_lib.dispatcher?p_event_name=emailUnsubscribe&p_email=...

// Take the lead to a different page on successful submit, ignoring the form's configured followUpUrl

    

   location.href = UnSubEnUrl + EmailAddr ;

        // Return false to prevent the submission handler continuing with its own processing

        return false;

    });

});</script>

Here is the page URL:  http://go.cst.org/Unsubscribe-Page.html

Patrick_Cash1
Level 1

Re: Using a token for a form follow up page

Hi Olga,

I just wanted to say thank you for this snippet. I used it to help pass form submission info to an external site. Saved me loads of work!

Patrick