Re: Important Change to form Prefill

Ayan_Talukder
Level 5

Re: Important Change to form Prefill

This is good to know, so if someone who is not cookied shows up to a form embedded on a non-Marketo page, it will show the default token values?

SanfordWhiteman
Level 10 - Community Moderator

Re: Important Change to form Prefill

Cookied or not doesn't matter. Tokens don't work on non-Marketo pages. They won't see the default value, they'll see the literal name of the token.

SanfordWhiteman
Level 10 - Community Moderator

Re: Important Change to form Prefill

Embedding tokens directly in the form descriptor (a) doesn't work for all data types and (b) breaks on some data values, if that's what you're referring to. It's not a true substitute. Works fine for <input type="text"> variants.

Luben_Solev1
Level 2

Re: Important Change to form Prefill

Thanks Sanford,

Are you saying that the "Using lead tokens as default values" method will only work for text fields, but will not pre-fill dropdown or other type fields (e.g. Country, Industry, Tickboxes) whilst your JS method will prefill all?

Thanks in advance for the clarification

Luben

SanfordWhiteman
Level 10 - Community Moderator

Re: Important Change to form Prefill

Are you saying that the "Using lead tokens as default values" method will only work for text fields, but will not pre-fill dropdown or other type fields (e.g. Country, Industry, Tickboxes) whilst your JS method will prefill all?

Correct. As you can see in the Form Editor, you can't directly use a lead token to set values in a Checkboxes group, among other gaps (and some particularly prickly value conflicts).

You don't need to write any JS yourself to use the code Greg links to: its default behavior is to find and Pre-Fill Marketo forms on the page (you can use it to Pre-Fill non-Marketo forms on non-Marketo pages, too, but that requires dev work).

Luben_Solev1
Level 2

Re: Important Change to form Prefill

That's great. Much appreciate the info!

Have a great day Sanford.

Ayan_Talukder
Level 5

Re: Important Change to form Prefill

Thank you for the helpful replies Sanford. Just to clarify, for the guided landing page template HTML, we can use "token" values for checkboxes?

So for example for a preference center, we would just enter the Marketo token as such:

<mktoField inputName="Newsletter">{{lead.Newsletter}}</mktoField>

SanfordWhiteman
Level 10 - Community Moderator

Re: Important Change to form Prefill

No (when would you ever be hand-creating the inputs anyway?).

Use my Pre-Fill method, like lots o' people are noting it covers all these areas well.

Ayan_Talukder
Level 5

Re: Important Change to form Prefill

Oh yes I was referring to your method. I noticed in the landing page template you had the mktoField inputs, I'd follow the same for any type of field (including checkboxes). It sounds like it should be fine. I'll give it a go.

Ayan_Talukder
Level 5

Re: Important Change to form Prefill

I really appreciate Sanford Whiteman​'s blog and will be looking at it carefully to implement the solution for our company.

At the same time, I am really disappointed that Marketo is not being transparent about this issue. Why the sudden change? Companies have to scramble to fix forms that rely on form pre-fill (for forms such as preference centers).