Service Portal: Chrome Identifying Fields as Address Fields and Offering Autofill Values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2019 07:59 AM
So, many of our users have been experiencing a weird little glitch when completing Service Portal request forms using Google Chrome. For some reason, Google Chrome thinks some fields are address fields, and as such when you click on them, it offers recent/saved autofill information. This looks rather odd when filling out a fields that have nothing to do with addresses, and it offers autofill options like "New York".
It appears that the issue is with Google Chrome, and it can be rectified by turning off the "Save and file addresses" Autofill setting in Chrome settings.
However, what I am wondering is why Google Chrome thinks certain non-address fields are addresses, and is there anything we can do in ServiceNow to make sure that Google Chrome does not mistakenly identify them as address fields. (I do not know if the Field Type has anything to do with it. The current example I am looking at is a List Collector variable to a Reference table I have. I do not know if it behaves like this only for List Collectors, or other Field Types as well.)
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2019 05:27 AM
No, not really. We just updated our Google Chrome settings. It would be nice to do it at the ServiceNow level, but we are just handling that way currently.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2020 02:20 PM
I just ran into this issue as well. After fooling around with dictionary attributes with no luck, I decided to look at the DOM instead. Although these elements already have the "autocomplete='off'" attribute, the browser auto-complete was still kicking in. I removed attributes until the browser stopped auto-completing and the wining (losing) attribute was "type='search'". This does not impact any autocomplete attributes you may have defined.
This client script resolves the issue: (assuming you have client globals turned on)
function onLoad() {
//jQuery
jQuery("input[type='search']").each(function(i) { jQuery(this).attr('type', ''); });
//Straight JS
document.querySelectorAll(`[type="search"]`).forEach(function(el) { el.setAttribute('type', ''); })
}
You could individually target the field inputs as well if you didn't want to run this for every reference input.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 01:56 PM
Hi Joe,
I am receiving an error when I try to use this script. The error is: TypeError: jQuery is not a function
Do you know how I can resolve this?
Thanks!
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 05:44 PM
Hey Mark,
That usually happens because client global objects are being blocked. You can check the KB article I linked above for more info. You'll need to add a system property to allow your client scripts access to them. You may need to add a system property for each scoped app that needs to access the client globals as well.
Alternatively, just slap a "this" in front of jQuery.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2022 03:08 AM
Thanks Joe. Adding "this" got me past the error.
We are seeing some String fields on our Catalog Item form for entering first name, last name, etc. that Chrome is allowing a user to autofill with values they have used in the past. Do you know if there is a way we can prevent this?
Thanks for your help!
Mark