SOLVED

How to create a two-part webform on two landing pages?

Go to solution
44MattWolf44
Level 3

How to create a two-part webform on two landing pages?

Hello!

I haven't fully tested this yet, but I am wondering if it's possible to do the following:

Can I create a webform that, once submitted, redirects to a second webform, and then ensure that the data from both the first and second webform makes it onto the same lead record?

More specifically, what I'm trying to accomplish is, webform #1 will ask for basic info, and webform #2 will ask a bunch of optional product-specific questions. All the questions combined are too big for one webform, which is why I am hoping to be able to split it up into 2 webforms. Also I should mention that these are external landing pages on our company website, not Marketo landing pages.

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: How to create a two-part webform on two landing pages?

Yes, if the person does not block cookies, this works out of the box because the Munchkin cookie will be associated with their Marketo Person record (identified by the Email field) by the 1st form submission and then the 2nd form submission doesn’t even need the Email field at all.

 

If you’re concerned about the no-cookie case you can forward the Email address to the second form and have it populate a hidden field, i.e.:

MktoForms2.whenReady(function(mktoForm){
  mktoForm.onSuccess(function(submittedValues,thankYouURL){
    thankYouURL += "&Email=" + encodeURIComponent(submittedValues.Email);
    document.location.href = thankYouURL;
    return false;
  });
});

View solution in original post

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

Re: How to create a two-part webform on two landing pages?

Yes, if the person does not block cookies, this works out of the box because the Munchkin cookie will be associated with their Marketo Person record (identified by the Email field) by the 1st form submission and then the 2nd form submission doesn’t even need the Email field at all.

 

If you’re concerned about the no-cookie case you can forward the Email address to the second form and have it populate a hidden field, i.e.:

MktoForms2.whenReady(function(mktoForm){
  mktoForm.onSuccess(function(submittedValues,thankYouURL){
    thankYouURL += "&Email=" + encodeURIComponent(submittedValues.Email);
    document.location.href = thankYouURL;
    return false;
  });
});
44MattWolf44
Level 3

Re: How to create a two-part webform on two landing pages?

Thanks so much Sanford, this is immensely helpful!

I'm not very coding savvy, if you have a moment would you be able to please show an example of how that snippet of code you shared would interact with the webform code snippets? I'd greatly appreciate it

SanfordWhiteman
Level 10 - Community Moderator

Re: How to create a two-part webform on two landing pages?

This would go in its own <script> after the embed code (on a Marketo LP, put it just before the closing </body> tag as that ensures the embed code is above it).