Is it possible to disable autocomplete?
Asked Answered
C

2

5

I know i shouldnt do it but it may be easier then explaining to the clients that you should do it through the browser. They have a public computer and a server running on the machine in an admin account (the code i am writing). They want people to enter their information but they dont want someone pressing down on the email input box to display ppls email address. Is there a way i can disable this through code in IE? (i believe they are using 6 but they may use 7 or 8).

Crusade answered 16/9, 2010 at 20:39 Comment(0)
P
15

Use the non-standard autocomplete attribute:

autocomplete="off"

Works in all modern browsers. Will break HTML 4 validation, though. No way around that. Will be valid in HTML 5.

Reference:

Pteryla answered 16/9, 2010 at 20:40 Comment(4)
so <input ... autocomplete="off"> ok i'll try this now. -edit- yes it worked! will accept when i canCrusade
you could use JavaScript to append the autocomplete attribute to the textbox, no? Then it would work and your page would still validate. Best of both worlds.Phillida
@Phillida good idea, but that won't work with form values that get auto-completed on page load. The only way to disable this that works with valid HTML is to re-name the form elements on every request like user124928239 ...Pteryla
that doesn't work anymore either since my form inputs names are randomly generated on load and yet still contain the same information there is NO way to get around the autofill anymoreSuccubus
S
2
<input name="name" autocomplete="off">
Slipnoose answered 16/9, 2010 at 20:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.