Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Annoying IE autofill boxes invading my form 1

Status
Not open for further replies.

duph

Programmer
Sep 22, 2005
20
US
So my site is all but done except for these terrible autofill boxes that are squatting on my text inputs in IE. And what's worse is they're inconsistent - e.g. 4 fields have it and 3 don't. Anyone know how to make sure this thing is disabled for my users?

Thanks!
 
try putting [red]autocomplete="off"[/red] in your form tag.



Hope This Helps!

ECAR
ECAR Technologies, LLC

"My work is a game, a very serious game." - M.C. Escher
 
Seemed promising, but no dice. ?
 
This site seems to suggest that this might be an IE-only feature: Are you using IE?

This site says "use it, but don't rely on it" (although it doesn't say why):
This site describes, among other things, how to shut off autocomplete. Again, IE-only:
AutoComplete can be turned off using one of the following options:

1. Administrators can turn off AutoComplete and restrict its use through the Internet Explorer Administrators Kit (IEAK). When an administrator turns off AutoComplete, there is no way for a Web site or user on the administrator's intranet to turn it back on.
2. Web sites can turn off AutoComplete using the AUTOCOMPLETE attribute. When a Web author disables AutoComplete, the AutoComplete box does not appear for the disabled form or field and the values are not stored.
3. Users can turn off AutoComplete from the AutoComplete dialog box in Internet Explorer. The AutoComplete dialog box is available by selecting Internet Options from the Tools menu, and then selecting the Content tab. When a user turns off AutoComplete, there is no way a site can turn it back on.

--Dave
 
It's definitely only IE that is causing the problems. So far the autocomplete attribute has done nothing in both the form tag and the individual input tags. I have also turned off all my personal autocomplete settings in the Content tab and the same darned text input boxes keep rendering differently than the rest. Emptied the cache a hundred times, did a rain dance...
 
Let me take a guess since the other solutions don't seem to be helping you.

Do these fields have a yellow background to them (so you can identify them as auto-fill)? If so, the issue is being caused by a 3rd party Toolbar (like the Google Toolbar). There is not a lot you can do to stop it.

If they aren't yellow backgrounded fields... then ignore this suggestion [smile]

Cheers,
Jeff

[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]
 
Yes, definitely yellow backgrounded fields, definitely ugly. I was afraid they would never go away...

Thanks!
 
If they've installed the Google Toolbar on their PCs, maybe they want the functionality that it gives them?
You know, whilst I would normally agree with that statement, I remain floored at the lack of care and understanding that UK Office workers use when installing such software. As a result it wouldn't surprise me if they had no idea at all what it was... they just installed it:

- because they use google and they can search from the toolbar
- because a friend said it was really useful
- because they saw it at the bottom of the google page and clicked
- actually, they never installed it - they inherited the computer

Chris, in this instance I would place the emphasis on the "maybe" rather than the "want" in your comment. Although it's a moot point really [smile]

Cheers,
Jeff

[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]
 
Yeah, it threw me rather (back in the dark days when I used to surf with IE). Not so much the autocompleting, but the fact that it was the Google Toolbar that was turning my input fields yellow. It's neither obvious nor expected behaviour.

Nonetheless, I don't think you should try to disable a function in the end-user's browser either because you personally don't like it, or because you think some/many of your users don't understand it. You need to chill out and leave it to the user to control their environment.

That said, I make exceptions - I tend to disable IE's image toolbar on my site for pretty much the reasons I've criticised above. I suppose I'm just more tolerant of a tool that users choose to install that makes it easier to fill in forms, than one that's dumped on them to make it easier to steal images!

If you really want to stop the Googlebar's autocomplete, I suggest you follow Tony's advice and change the names of your form fields. My understanding is that the toolbar sees a field called "name" and offers to autofill it with the user's name. It should be fooled if you call that field "banana". It's a good way to hide your comment forms from spambots too.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
It is quite easy to disable the changing of the background color to yellow, but yet still leave the functionality, if you are using CSS. If so, hopefully you have one ruleset that you use only for your input fields.

All you must do is add the following to your ruleset:

.....
background-color:#000 !important;
.....

Note: "!important" is not a comment, but rather an actual CSS parameter which causes any subsequent changes to be ignored...unless they too have the !important designator.

I just recently discovered this solution as I was using a dark blue background with yellow text for data input fields...changing the background to the same color as my text was not helping data entry accuracy! :)

Also, prior to finding the above solution, I changed my fields to seemingly meaningless names, but the AutoFill would still pick one or two to highlight.

I can provide a link to a couple other options I found using Javascript if this does not work for you. I just joined this site so I could post this reply and did not wnat to violate any rules against posting URLs.
 
Whilst your solution will work (using the !important rule) this is going to interfere with any user defined stylesheets that the user may have enabled.

It's a fine solution to the problem (don't get me wrong) - but please don't abuse the !important rule... please don't go abusing it to force font sizes or non-standard colours. I think the suggested rule of setting the colour to white would be fine.

Who would have user stylesheets (you ask)? People who have vision difficulties may do this to (for instance) increase the size of text, reset colours (so they are more visible) etc. There are lots of reasons. And some browsers manage to screw it up as well *sigh*

Cheers,
Jeff

[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]
 
Of course you can put !important rules in user style sheets too, which will trump any other !important rules. If you are going to do this, be sure to define the foreground colour with equal strength. Just putting
Code:
background-color:#000 !important;
will force the background to be black, you wouldn't want the foreground to default to black too.

It's all moot with regard to the Google toolbar, since it's only available for IE, and IE doesn't recognise the, err, importance of [tt]!important[/tt] rules.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top