• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How do you turn off auto-complete for forms on the server-side?

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
My clients are Realtors. I provide photography for them. I have them fill out an order submission form in which I ask for the address of the house that they want us to photograph.

Unfortunately, they're not the most detail-oriented bunch of people. Most of the time they put in their name, their browser auto-fills the fields with the address of their OFFICE or their own PERSONAL HOME, NOT the address of the house they're selling, and they press submit without a second thought.

Even after 3 confirmation emails in which the erroneous address is clearly visible, we don't find out that it is the address to their office or personal home until our photographers are already AT the location.

How do I disable auto-complete on my form? It needs to be disabled for any browser they may be using.
 
Last edited:
Looks like there's two ways:

<input type="text" name="foo" autocomplete="off" />

Or have PHP/Javascript whatever randomize the name of the field so that when you ask for address, it ends up being "jkh298y42tyt" which Chrome won't know how to autocomplete. There's no WC3 valid way to do this.
 
Looks like there's two ways:

<input type="text" name="foo" autocomplete="off" />

Or have PHP/Javascript whatever randomize the name of the field so that when you ask for address, it ends up being "jkh298y42tyt" which Chrome won't know how to autocomplete. There's no WC3 valid way to do this.

Thanks. I've heard that some browsers don't respect autocomplete="off"?

How exactly does AutoComplete work?

<code><p>Address of Property</p>
<input name="address1" type="text" id="address1" value="" required />
</p></code>

Based on these properties, how does AutoComplete know to put in an predefined address in this field? Is it the "name" or "id"? If I change the name or id to not contain the word "address" would that fix it?
 
Every browser does it a little different, it's probably an and/or of both name and ID, maybe it even uses the closest label as a hint.
 
Every browser does it a little different, it's probably an and/or of both name and ID, maybe it even uses the closest label as a hint.

Yeah, it's the reason why there's no W3C way of doing it. Chrome does it this way, Firefox the other. Just change the ID and the name in addition to the auto complete flag.
 
My clients are Realtors. I provide photography for them. I have them fill out an order submission form in which I ask for the address of the house that they want us to photograph.

Unfortunately, they're not the most detail-oriented bunch of people. Most of the time they put in their name, their browser auto-fills the fields with the address of their OFFICE or their own PERSONAL HOME, NOT the address of the house they're selling, and they press submit without a second thought.

Even after 3 confirmation emails in which the erroneous address is clearly visible, we don't find out that it is the address to their office or personal home until our photographers are already AT the location.

How do I disable auto-complete on my form? It needs to be disabled for any browser they may be using.

Make the entry form a multi-step process, they enter the address... then on the next page you show Google Street view on one side, the birds eye view in the other, with a Giant
"IS THIS THE CORRECT ADDRESS? YES | NO"
 
Last edited:
Back
Top