AnsweredAssumed Answered

Using Non-Marketo Form to Get Data into Marketo

Question asked by Mallory Green on Sep 20, 2019

We are implementing a solution that is completely built within Salesforce, which includes a registration page that has a Salesforce form rather than a Marketo form. Is there a way to use the code for submitting Markeo forms in the background to get the data off the Salesforce Form submission into Marketo. 

 

This is the code we are looking at implementing, but we don't know how to get the form field data from Salesforce into the Marketo code to submit properly. 

 

I've pulled the SOAP API names for the fields that exist on the Salesforce forms, but now we don't know what to put in the quotation marks to have it pull the data from the Salesforce into that SOAP API field. 

 

<script src="//app-ab32.marketo.com/js/forms2/js/forms2.min.js"></script>
<form id="mktoForm_1374" style=”display:none”></form>
<script>MktoForms2.loadForm("//app-ab32.marketo.com", "618-LOH-235", 1374);
var marketoForm = MktoForms2.allForms()[0];

marketoForm.addHiddenFields({

"FirstName": " what do we put here to pull this field information from Salesforce form",

"LastName": "what do we put here to pull this field information from Salesforce form",

"Company": "what do we put here to pull this field information from Salesforce form",

"Email": "what do we put here to pull this field information from Salesforce form",

"Phone": "what do we put here to pull this field information from Salesforce form" });

marketoForm.submit();
</script>

Outcomes