Also, if you only care about the email address you can just pass it in the URL.
On the first page:
MktoForms2.whenReady(function(form){
form.onSuccess(function(vals,tyUrl){
var tyLoc = document.createElement("a");
tyLoc.href = tyUrl;
tyLoc.hash = encodeURIComponent(vals.Email);
document.location = tyLoc;
return false;
});
});
On the second page:
MktoForms2.whenReady(function(form){
form.setValues({Email : decodeURIComponent(document.location.hash.substring(1))
});
});
That's a tidy solution! Yes, that will work
Just double checked - it's definitely set to follow up with landing page:
Maybe the form descriptor is corrupt and that's why you aren't getting the aliId now -- but that for sure would cover you, it's pretty much designed for this case.
Thanks again Sanford - I'm going to go ahead and update to pass email via the URL parameter as you suggest. Definitely owe you a beer if I ever happen to make it to Marketing Nation!
I wondered if it might be due to having two embedded forms on the page that the form wasn't behaving as expected, but have tried removing the other embedded form and didn't make any difference.
Thanks again Sanford - I'm going to go ahead and update to pass email via the URL parameter as you suggest. Definitely owe you a beer if I ever happen to make it to Marketing Nation!
Sounds good!
It wouldn't be the 2 forms. I think the form must be corrupt (which happens, albeit very rarely) and isn't remembering that you're using a named LP. You should be getting the aliId attached automatically.
Hello Sanford Whiteman,
We ran into a similar problem and were wondering if you could help.
We have a simple Marketo form with an email address field and a hidden checkbox field with the default value = “True”. After this form is submitted, the person is redirected to another Marketo LP with a form on which this checkbox field is visible and should be selected, and the email address should be pre-populated too. We noticed that sometimes the checkbox is not selected, but the email address is populated. We have the aliId in the url when the person is redirected to the second Marketo page.
How can we pass the hidden value “True” for a field from the first to the second Marketo form?
Thank you
Maria
What is/are the URLs here?
Hi Sanford,
Here is the url: http://go.bain.com/test-email-address-form-1.html
We expect the "Bain Insights newsletter" to be selected on the second page.
The value should be "yes" (lowercase) actually, not "True" -- that's the canonical way that Booleans are represented on Marketo forms. so when you have a Hidden field (which is a freeform string) it should use the same values.