Hiding a form field should turn off prefill by default

Hiding a form field should turn off prefill by default

When hiding a form field (setting it to "hidden" type), the prefill setting stays to "Enabled". If the user does not disable that setting, the field will not capture the values for the field on exiting, cookied, leads. The value from the database will prevail and the form will not work as intended.

And this happens!

So my recommendation is that, when a form field is set to hidden, the prefill setting should change to "Disabled" y default.

-Greg

11 Comments
Grégoire_Miche2
Level 10
Grégoire_Miche2
Level 10
Dan_Stevens_
Level 10 - Champion Alumni

So Marketo will not prefill a hidden field if the value exists within a lead record?  Or is the issue here that if the desire is to modify that field (default value, URL parameter, etc.), Marketo will not populate it properly if it's pre-filling an existing value from the lead record instead?

Iryna_Zhuravel4
Level 8 - Champion Alumni

it will pre-fill an existing value from the lead record, it can be very painful actually, as you might be losing a lot of data this way.

SanfordWhiteman
Level 10 - Community Moderator

I don't think there's anything not "proper" about the behavior, it just needs to be understood. I actualy voted down because it would be a big BC break if the default changes (not changing defaults is a major software design principle).

Yes, it's true that if you want data to be automatically overwritten by render-time data (query params, cookie params) you might be surprised when it is not.  But the reverse is not an improvement: if I have initialUTMMedium I don't want the field to be cleared by an empty query param.

Really, without JS-based attribution tracking you can't get what you want every time.  This is why I almost never AutoFill hidden fields (though may PreFill them) because I want full control over what gets written over time.

Grégoire_Miche2
Level 10

Hi Sanford,

There is a significant usage of hidden fields that is for simply setting a filed value using the default value, not a values captured from a cookie nor from a querystring parameter. e.g: the unsubscribe = True in unsubscription forms. And non advanced users just do not get what is happening and why people who have filled out that form are not unsubscribed...

Furthermore, if I have an initialUTMMedium field, I'll block updates in the admin section.

May the idea should be only to set this when the hidden field is supposed to be populated from a default value...

-Greg

Grégoire_Miche2
Level 10

Hi Dan,

You second assumption is right. If prefill is set to "enabled", Marketo will not override any value in the field form the lead record if this lead is cookied and recognized by Marketo.

-Greg

Grégoire_Miche2
Level 10

To complement the use case, I am thinking especially of boolean fields such as "Unsubscribe". Because, in this very case, forgetting to disable the prefill drives to breaching the CAN/SPAM and other similar regulations, which, IMHO, is worse than missing some attribution values

-Greg

SanfordWhiteman
Level 10 - Community Moderator

Furthermore, if I have an initialUTMMedium field, I'll block updates in the admin section.

That blocks all updates from form fills.  For selective updates based on runtime info, you can't use a blanket administrative block. When recording attribution history, we make a lot of (JS-based) judgments before deciding whether hidden fields should be updated or not, and sometimes clear fields entirely. Again, the point is there's no one-size-fits-all setting here; any sophisticated tracking requires code.

If this feature were just being built, though, I could definitely see having the default be PreFill off. As it's already in the wild, changing the default is not something I can get behind.

SanfordWhiteman
Level 10 - Community Moderator

Only if you don't test it.

I think this is like the pURL oddities: you have to get the order of operations.  Then there's nothing to screw up, because you build your solutions to the rules.