Form is not Pre-Filling lead data | Community
Skip to main content
New Participant
June 19, 2018
Solved

Form is not Pre-Filling lead data

  • June 19, 2018
  • 1 reply
  • 3246 views

I'm trying to set up an Email Subscription Center but I'm running into pre-filling issues.

My Setup:

Guided Landing Page:

- Holds Header, Footer, and form# variable which controls which form is shown.

- Form is initialized here with the following code:

<div class="contest-form">

  <script src="//app-ab13.marketo.com/js/forms2/js/forms2.min.js"></script>

  <form id="mktoForm_${formID}"></form>

  <div id="confirmform" style="display:none">hello</div>

  <script>

  MktoForms2.loadForm("//app-ab13.marketo.com", "204-HUD-558", ${formID}, function ( form ){

    form.onSuccess(function() { 

      document.getElementById('confirmform').style.display= 'block';

      document.getElementById('confirmform').style.visibility= 'visible';

      return false; 

    }); 

  });

  </script>

</div>

Landing Page:

- Form variable is entered here and (if the form # exists) the form is displayed on the landing page.

Form:

- Subscription center fields.

- Form Pre-Fill is enabled on all fields.

Issues:

1. When visiting the landing page, the form is not pre-filling on the landing page.

2. Trying to use a token at the top of a form doesn't even fill in the default value: Hello, {{lead.Email Address:default=yo}} is displayed instead of the actual lead Email address or the default of "yo" I have tried removing the space between Email Address with the same result.

Am I initializing the form incorrectly in the root Guided Landing Page Template?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

OK. The reason this is happening is Pre-Fill is only natively supported with named mktoForm elements. When you use the form embed code on a Marketo LP, it's treated the same as an external page, ergo Pre-Fill is disabled.

1 reply

SanfordWhiteman
New Participant
June 19, 2018

Please move the thread to Products and I'll answer there (this space is for discussing the Champs program itself). Move link is at the right.

andyw504Author
New Participant
June 19, 2018

Moved. Thank you.

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
June 19, 2018

OK. The reason this is happening is Pre-Fill is only natively supported with named mktoForm elements. When you use the form embed code on a Marketo LP, it's treated the same as an external page, ergo Pre-Fill is disabled.