Help! How to use Forms 2.0 on Marketo Guided Landing Page?
Hello fellow community!
I have been looking at a lot of resources lately around forms 2.0 as we have a few use cases where we'll want to assign certain hidden field values at time of submission such as the referrer, current URL, and conversion date.
I haven't been able to find a resource to explain how to add the code in a Marketo LP. I understand that I can embed the form in a script on my WordPress site using an HTML block plus something like:
MktoForms2.whenReady(function(readyForm){
readyForm.onSubmit(function(submittingForm{
submittingForm.addHiddenFields({
LastFormURL: document.location.href
});
});
});
MktoForms2.whenReady(function(readyForm){
readyForm.addHiddenFields({
lastReferrerURL: document.referrer
});
});
(Shoutout to @sanfordwhiteman for the script!)
---
What I am stuck on is how to make this work on a Marketo Guided Landing Page. I can't think of a way to add an html block to the actual page and updating the template code did not seem to work on a test.
Additionally, for something like writing the datetime of the form fill, what is the best way to achieve that?
Thanks in advance!
Manny 🙂
