Migration from Pardot - form handlers

Highlighted
Level 1

Migration from Pardot - form handlers

Hi,

We're moving away from Pardot to Marketo. We currently have forms on the website using Pardot's form handlers. Preference is that we want to keep the website forms and use something that we can post the info from the forms to Marketo.

I've been reading and searching for information about is there any equivalent to that in Marketo, but I'm failing to find.

Am I missing something? I've always been using the embedded forms until now and this is unfamiliar territory.

4 REPLIES 4
Highlighted
Level 10 - Community Moderator

Re: Migration from Pardot - form handlers

There's not just 1 but 2 different ways to post data from a 3rd-party form to a Marketo forms endpoint.

 

The more "packaged" way is to pass the data to a hidden Marketo Forms 2.0 form and call the JS API's submit() method. You grab the field values from your form, assemble them as a JS object (which will likely involve mapping the Pardot field names to Marketo names, or maybe not if they happen to be aligned!).

 

The more primitive way is to post to the Marketo scriptless endpoint, which is https://pages.example.com/index.php/leadCapture/save (where pages.example.com is your Marketo LP domain). This is a standard (x-www-form-urlencoded) form post, nothing special at all. You can see how this works easily by setting up a Marketo LP. The <noscript> version of the form posts to that same endpoint.

Highlighted
Level 1

Re: Migration from Pardot - form handlers

Thank you, Sanford!

I think I'm doing something wrong, because I don't get any results.

 

<script src="//xxxxxxxxxx.marketo.com/js/forms2/js/forms2.min.js"></script>
<form id="mktoForm_1217" style="display:none"></form>
<script>
MktoForms2.loadForm("//xxxxxxxxxx.marketo.com", "xxxxxxxxxx", 1217, function(form){
var myForm = MktoForms2.allForms()[0];
myForm.addHiddenFields({
//These are the values which will be submitted to Marketo
"FirstName":"first-name",
"LastName":"last-name",
"Title":"title",
"Email":"email",
"Phone":"phone",
"Country":"contact-country"
"State":"contact-state",
"customBuyerField1":"comments"
});
myForm.submit();
});
});
</script>
Highlighted
Level 10 - Community Moderator

Re: Migration from Pardot - form handlers

Please highlight your code using the Syntax Highlighter, then we'll continue.

 

syntax_js.png

Highlighted
Level 1

Re: Migration from Pardot - form handlers

Thank you, Sanford.

Makes sense to paste code here that actually looks like code.

For the time being we decided to recreate all forms in Marketo and place them on the site. Although exploring this solution seems very interesting - I'd certainly devote some time to it once we do the migration.

Thank you for you help, nonetheless!