Subscription Center Checkboxes not autofilling | Community
Skip to main content
September 10, 2015
Question

Subscription Center Checkboxes not autofilling

  • September 10, 2015
  • 3 replies
  • 4557 views

Hey everyone!

I just put together a neat little subscription center to give our subscribers more options about what content they'd like to receive from us.

It's a big win--there's only one problem:

I've set the subscription settings as BOOLEAN variables, and the form updates these fields correctly when the form is submitted, but the checkboxes are not pre-filled as intended.

Obviously we want the fields to be auto-filled to keep people defaulting into subscriptions they already have.

Does anyone know what might be causing this issue?

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

3 replies

Edward_Masson
Level 10
September 12, 2015

Is your form being added to a non Marketo landing page? Form 2.0 on non Marketo LPs are not prepopulating. It’s a known issue within the community.

I have not tested it but try and add the form to a Marketo LP and see if its prepopulating.

September 14, 2015

It is on a Marketo LP.

Elliott_Lowe1
Level 7
September 14, 2015

Forms 2.0 can be pre-populated on a non-Marketo LP using a Data Transfer Object.  Sample code by @Sanford Whiteman for this technique can be found in the Aug 26 NY MUG presentation slides at NYC MUG 2015-08 v2 by sanford.

September 14, 2015

It is on a Marketo LP.

There are multiple forms on this landing page, and the other forms are populating correctly.

I double-checked the variables, and the data is there, it's just not pre-filling. I was thinking there may be some peculiarities with Checkboxes interacting with BOOLEAN values? When the form is submitted, the values update correctly on the back end.

October 23, 2015

I was having the issue of the page loading faster than Marketo could pre-fill the new values, so I was seeing the old values instead of the new ones.

To get around this issue I dragged on an HTML code area to the page and inserted this javascript to load the page once more after the initial load.

<script type="text/javascript">

window.onload = function() {

    if(!window.location.hash) {

        window.location = window.location + '#loaded';

        window.location.reload();

    }

}

</script>

October 23, 2015

I put this code on the "confirmation" page that shows the same form again with a "your preferences are now updated" message.