Disabling Chrome Autofill | Community
Skip to main content
Keith_Jellick2
Level 1
Aug 10, 2018 3:59 PM UTC
Solved

Disabling Chrome Autofill

Hello Marketo Community,

Has anybody had any luck disabling Autocomplete in newer versions of Chrome? When you use the "Disable Autocomplete" functionality in the Forms Editor, it simply changes the code to autocomplete="off" . Unfortunately, Chrome now ignores this command. From what I found, changing the code to autocomplete="new-password"  will work, but I'm not sure how to change that in Marketo. Does anybody have any insight on this?

Thank you,

-Keith

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
Aug 11, 2018 10:54 PM UTC

MktoForms2.whenRendered(function(form){

  var formEl = form.getFormElem()[0],

    autocompleteDisabledEl;

  while( autocompleteDisabledEl = formEl.querySelector("[autocomplete='off']") )

    autocompleteDisabledEl.setAttribute("autocomplete", "new-password" );

});

But don't expect a full cross-browser-version solution to be simple, or even possible... this is still a buggy area in browsers.

4 replies

Abaran
Level 5
Nov 9, 2018 12:02 PM UTC

Hey Keith, are you referring to the Forms Editor in Marketo or Chrome? I cannot find any setting in Marketo to turn off the autocomplete. Can you share a picture if it is Marketo.

Thanks a lot

Axel

Translate
SanfordWhiteman
Level 10
Nov 10, 2018 2:39 AM UTC

There's no relevant setting in the Form Editor AFAIK. Wouldn't work anyway.

Translate
SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
Aug 11, 2018 10:54 PM UTC

MktoForms2.whenRendered(function(form){

  var formEl = form.getFormElem()[0],

    autocompleteDisabledEl;

  while( autocompleteDisabledEl = formEl.querySelector("[autocomplete='off']") )

    autocompleteDisabledEl.setAttribute("autocomplete", "new-password" );

});

But don't expect a full cross-browser-version solution to be simple, or even possible... this is still a buggy area in browsers.

Translate
Keith_Jellick2
Level 1
Aug 15, 2018 4:05 PM UTC

Worked like a charm, Sanford. Thank you so much!

Translate