Add token as string to submit button on form?

Highlighted
Level 4

Add token as string to submit button on form?

Is there a way to add a token or var to the end of the submit url on a form?

4 REPLIES 4
Highlighted

Re: Add token as string to submit button on form?

Hi Jason,

What exactly are you trying to achieve?

If you want to add a parameter at the end of the follow-ip URL, this can be done using the Forms 2.0 API and a hidden section on your page that contains the token.

-Greg

Highlighted
Level 4

Re: Add token as string to submit button on form?

We need to carry a url variable from the page containing the marketo form to the subsequent page(s).

Highlighted

Re: Add token as string to submit button on form?

Hi Jason,

example #2 on this page : Forms 2.0 » Marketo Developers​ explains how to acheive this.

You can replace the location.href value by any fixed value or a value that you capture from the page containing Marketo.

Now, it may also be easier to do this using session cookies, especially if you want to carry this information on more than 2 pages.

-Greg

Highlighted
Level 10 - Community Moderator

Re: Add token as string to submit button on form?

MktoForms2.whenReady(function(form){

  form.onSuccess(function(vals,followUpURL){

    document.location = followUpURL + document.location.search;

    return false;

  });

});