I just learned that pre-fill isn't available for Marketo forms not hosted in Marketo landing pages.
Does anyone know a custom way to make Marketo forms auto-fill when hosted on WordPress? Hoping there's a JavaScript trick or something but could be wishful thinking.
Thanks,
David
What would keep you from creating a Landing Page with a Form 2.0 and pull in the LP in an iframe?
I was able to find some documentation here: http://developers.marketo.com/blog/external-page-prefill/
However, we are still having issues and getting errors when testing this using Rest API.
Here is the info our developer has sent me outlining the issues. Can anyone help?
As per above link to prefill in external non marketo , we need to first authenticate with marketo and after that we can access the data from marketo. When we tried to access rest api for authentication, we received an error due to cross domain (here is the error message XMLHttpRequest cannot load https://007-aqx-577.mktorest.com/identity/oauth/token?grant_type=client_cre…3b4e-4f3d-aaca-1251c1323.... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://jord.webstarts.com' is therefore not allowed access.)
Below is code snippet:-
<script>
alert('testentryfunction');
var url = "https://007-AQX-577.mktorest.com/identity/oauth/token?grant_type=client_credentials&client_id=300e44...";
var client = new XMLHttpRequest();
client.open("GET", url, false);
client.responseType = "application/json";
client.setRequestHeader("Content-Type", "application/json");
client.setRequestHeader("Access-Control-Allow-Origin", "*");
client.send();
alert('testexistfunction');
</script>
We tried accessing the same url with chrome poster and it's working fine, but when we are adding it into a site exposed over the Internet for testing, we are getting an error. This call is going through a browser and I think we can’t use these API’s directly from a browser. If this is true then do we need to first call rest API from .Net, get data and then pre-populate on form when it's loaded?