Re: Subscription Center Checkboxes not autofilling

Anonymous
Not applicable

Subscription Center Checkboxes not autofilling

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?

10 REPLIES 10
Edward_Masson
Level 10

Re: Subscription Center Checkboxes not autofilling

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.

Anonymous
Not applicable

Re: Subscription Center Checkboxes not autofilling

It is on a Marketo LP.

Elliott_Lowe1
Level 9 - Champion Alumni

Re: Subscription Center Checkboxes not autofilling

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.

Anonymous
Not applicable

Re: Subscription Center Checkboxes not autofilling

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.

Anonymous
Not applicable

Re: Subscription Center Checkboxes not autofilling

Sanford Whiteman​, those are some really interesting slides - are the {}> etc links within some of the slides meant to link to external files, or am I missing something?

SanfordWhiteman
Level 10 - Community Moderator

Re: Subscription Center Checkboxes not autofilling

The arrows are meant to reveal "horizontal" slides (Slides.com lets you arrange slides up-and-down as well as start-to-end).

Anonymous
Not applicable

Re: Subscription Center Checkboxes not autofilling

Ah ok, just retried it. All good now. Thanks!

SanfordWhiteman
Level 10 - Community Moderator

Re: Subscription Center Checkboxes not autofilling

Let me know if you have any questions!

Anonymous
Not applicable

Re: Subscription Center Checkboxes not autofilling

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>