Re: Passing form field to follow-up page

Anonymous
Not applicable

Passing form field to follow-up page

Hi All,

What I would like to do is to pass the value of a form field captured in a landing page to the follow-up page of that form.

We would use it ot call a PHP page on our web site that would do some treatment base on the value of one field on the Marketo form.

Any idea?

Thx,
Greg
Tags (1)
7 REPLIES 7
Calvin_Lam
Level 4

Re: Passing form field to follow-up page

If I am understanding your question correctly, both the landing page and the thank you page will be hosted in Marketo and you are going to use some ajax to call your php page from the thank you page.  Is that correct? 

Just wanted to make sure I know this is a Marketo page or not before I offer suggestions.


Anonymous
Not applicable

Re: Passing form field to follow-up page

Hi Calvin,

The landing page will be hosted in Marketo, but the thanks you page will likely not be hosted in Marketo. What we would like is a way to use the landing page to capture an info (such as a requested document, a center of interest or even the visitor's email address) and pass this information to the CMS that hosts the thank you page.

What we need is to have the landing page generate the follow-up URL and add a parameter to it such as http://www.mycompany.com?centerofinterest=marketingautomation where marketingautomation would be the value of one of the form fields.

If this is not possible a solution in which we would store the "marketingautomation" value in a cookie would be acceptable.

Best regards,
Greg
Calvin_Lam
Level 4

Re: Passing form field to follow-up page

Hi Greg,

Check out Example 2 in http://developers.marketo.com/documentation/websites/forms-2-0/

You can listen to the form onSuccess event and set the location.href

Thanks,

Calvin
Anonymous
Not applicable

Re: Passing form field to follow-up page

HI Calvin, I have seen the example in the link you shared. I'm using a marketo landing page and form to redirect a user to a survey on getfeedback.com.

Essentially what I want to do is have a basic landing page with basic fields in ordr to create the lead initially (First Name, Last Name, Email, Company). Onsubmit the form would follow up to the survey itself. By passing the email or name through &email="value", the getfeedback program can attrnibute the survey results to that specific person and then I can update the lead with the results back in Marketo.

My initial thoughts were to add a token to the follow up URL, for example: https://www.getfeedback.com/r/e3OAl3Ne&email={{lead.Email Address:default=email}} however this doesn't read correctly in the browser.

Would it be possible to use the example you mentioned above to pass a form field value that the user has entered in order to set the URL value in location.href? And if so what would that look like.


 
Calvin_Lam
Level 4

Re: Passing form field to follow-up page

You will need to read the form value out.  For example:

var vals = form.vals();
var email = vals.Email;
document.location.href = "https://www.getfeedback.com/r/e3OAl3Ne&email=" + email;
Anonymous
Not applicable

Re: Passing form field to follow-up page

Hi Calvin,

I've tried the following script, without success:
---
<script>
  MktoForms2.whenReady(function (form){
        MktoForms2.loadForm("//app-lon03.marketo.com", "775-TUF-466", 1216, function(form){
      //Add an onSuccess handler
      form.onSuccess(function(values, followUpUrl){
          var vals = form.vals();
        var email = vals.Email;
        //Take the lead to a different page on successful submit, ignoring the form's configured followUpUrl.
        document.location.href = "https://www.getfeedback.com/r/e3OAl3Ne&email=" + email;
        //return false to prevent the submission handler continuing with its own processing
        return false;
      });
    });
  });
</script>
---

Notes:
  • Form is located on a marketo landing page
  • landing pag URL is http://pages.potential.com/JK-TEST-LANDING-PAGE.html
Calvin_Lam
Level 4

Re: Passing form field to follow-up page

If the form is already embedded on a marketo lp, you don't need to loadForm again.  If you get rid of the loadForm, it will work.