CSS to disable "autocomplete" input fields

Posted on 2008-02-09
Medium Priority
Last Modified: 2009-04-06
I don't want a HTML form field to have auto complete supply historical input entires.

This can be done in HTML as I demonstrated in the Code Window.

How can I set that behavior through CSS (without Javascript if possible)?
So I can recycle my class for forms that don't require auto complete like:
<input class="formNoAuto" name="my_field">
<input name="my_field" autocomplete="off">

Open in new window

Question by:gambit_642
1 Comment
LVL 48

Accepted Solution

hernst42 earned 2000 total points
ID: 20856714
AFAIk not possible as there is no attribute in CSS that is equivalent to the attribute autocomplete in CSS, so you can't use a class to achieve this. You must add the autocomplete-attribute in the HTML.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

No other job is as rewarding and demanding as building an iPhone app is. It is not really in the hands of the developer for the success of an iPhone app. Many factors operate jointly for every iOS application's success in the market.
AngularJS web development a very simple procedure. So, to put it, in short, AngularJS’ stand out features are – Two-way data binding, MVC structure, directives, templates, dependency injections and testing.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question