AnsweredAssumed Answered

Fill Marketo Form using Tokens/URL Parameters

Question asked by Audreon Babb on Jan 24, 2019
Latest reply on Feb 5, 2019 by Audreon Babb



We are trying to ensure a form is filled with the Marketo tokens rather than Pre-fill data when someone clicks on the landing page link in an email. I've read a few posts about this but can't seem to get the hidden fields and JS code to work.


The first field in my form is mapped to Email Address and I want it to populate the email in Marketo database (some visitors are seeing pre-fill info that doesn't match their Marketo email address).

I've created a hidden email field named renewEmailAddress and set the autofill to URL paramater: email. Would my JS code then look like the below? And would the link in the email would then look like{{Lead.Email Address}}? I don't think I'm putting the JS code in the right location and/or I'm using the wrong "source" and taget names in the code itself.


// Set your proxy (hidden) field to visible field mappings

var proxySources = [


source : "renewEmailAddress",

target : "Email Address",

readOnly : false



// --- No need to touch below this line! ---

var formEl = form.getFormElem()[0],

readyValues = form.getValues(),

mktoFieldsObj = {},

arrayFrom = Array.from ||;



return !!readyValues[proxy.source];



var fieldEls;

mktoFieldsObj[] = readyValues[proxy.source];

if (proxy.readOnly) {

fieldEls = formEl.querySelectorAll('[name="' + + '"]');



el.readOnly = el.disabled = true;







Message was edited by: Audreon Babb