Form is not Pre-Filling lead data | Community
Skip to main content
Level 2
Jun 19, 2018 8:30 PM UTC
Solved

Form is not Pre-Filling lead data

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.
SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
Jun 19, 2018 8:56 PM UTC

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.

4 replies

SanfordWhiteman
Level 10
Jun 19, 2018 8:43 PM UTC

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.

Translate
andyw504Author
Level 2
Jun 19, 2018 8:46 PM UTC

Moved. Thank you.

Translate
SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
Jun 19, 2018 8:56 PM UTC

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.

Translate