Skip to main content
May 23, 2016
Question

Can form follow up pages change based on link they clicked to get the form?

  • May 23, 2016
  • 2 replies
  • 1053 views

We have a number of webinars that we want to gate on our website using one form in a lightbox. I would like to use one form for all webinars, and then have the follow up page go to the correct video page URL based on the link they clicked to get to the form. For example:

View Webinar A Here --> link is clicked, then lightbox form comes up. When form is filled out, they are sent to Video A

View Webinar B Here --> link is clicked, then the same lightbox form comes up. When form is filled out, they are sent to Video B

View Webinar A Here --> link is clicked, then the same lightbox form comes up. When form is filled out, they are sent to Video A

I don't see how to do this. Can it be done? I feel like it's an easy solution, but my brain can't figure it out today! I would hate to have to do a different form for each webinar.

Thank you!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Josh_Hill13
Level 10
May 23, 2016

This has been documented here on the forums. Please search.

I do not necessarily recommend this system because it has to be updated frequently.

  • Use a Radio button or select box for the webinar in question.
  • that will provide a marketo only field with a value like "Webinar-X"
  • your TY page logic on the FORM will say "if Webinar-X, go to Page X"

There's an alternative where you can use the same Form, but it effectively lives on a separate page, but javascript or an iframe may need to be used.

If you have a web dev, I think this would work better with javascript.

May 23, 2016

Thanks Josh! I did search as much as I could and didn't run across anything that did what I wanted.

SanfordWhiteman
Level 10
May 23, 2016

<a href='#A' class="webinar-link">A</a>

<a href='#B' class="webinar-link">B</a>

<a href='#C' class="webinar-link">C</a>

<form id="mktoForm_1234" class="mktoForm"></form>

<script>

[].forEach.call(document.querySelectorAll('.webinar-link'), function(link) {

  link.addEventListener('click', function(e) {

    var variantClicked = this.hash.substring(1);

    MktoForms2.loadForm("//app-xx-yy.marketo.com", "AAA-BBB-CCC", 1234, function(form) {

      MktoForms2.lightbox(form).show();

      form.onSuccess(function(vals, tyURL) {

        alert('You clicked link ' + variantClicked);

        return false;

      });

    });

    e.preventDefault();

  });

});

</script>

May 26, 2016

Thank you Sanford!