Workflow and ServiceDesk Community

 View Only

Disable Input Field Autocomplete (Google Chrome) 

Oct 01, 2015 02:04 PM

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.

2015-01-20_19-46-02.png

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.

180px_2014-09-12_10-39-39.png

A demo package is attached to this article.

 

Statistics
0 Favorited
0 Views
1 Files
0 Shares
0 Downloads
Attachment(s)
package file
DisableAutoCompleteDemo.package   75 KB   1 version
Uploaded - Mar 11, 2020

Tags and Keywords

Related Entries and Links

No Related Resource entered.