Disabling Chrome Autofill | Community
Skip to main content
Keith_Jellick2
New Participant
August 10, 2018
Solved

Disabling Chrome Autofill

  • August 10, 2018
  • 2 replies
  • 4405 views

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.
Best answer by SanfordWhiteman

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.

2 replies

Abaran
New Participant
November 9, 2018

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

SanfordWhiteman
New Participant
November 10, 2018

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

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
August 11, 2018

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.

Keith_Jellick2
New Participant
August 15, 2018

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