Original article is posted here.
As I was presenting a project-in-development to a customer, the remark was made that “the suggested responses are going to be a problem, as this may be used on a community kiosk”. I was presenting a self-service password reset project and demoing with Google Chrome.
So after a bit of looking around, I put together this bit of javascript code to disable the autocomplete suggestions in Chrome:
//remember to paste into notepad (or similar) //before pasting into the Advanced Text Creator //in Workflow in order to remove formatting from the text. function DisableAutoComplete() { var thisForm = document.getElementById('form1'); thisForm.setAttribute('autocomplete','off'); }
This is called at body onload like this:
DisableAutoComplete();
The feature we’re disabling is illustrated below. It includes the dropdown list of values as well as the yellow background after one of the items is selected.
Here’s a moving picture to demonstrate two different forms; one with autocomplete in its default state, and another with it disabled by our code above.
A demo package is attached to this article.