Discuss how to use and promote Web standards with the Mozilla Gecko engine.
How can I design a web form that FireFox will not try to autocomplete?
For IE, I can add the parameter autocomplete="off" to either the <form> tag or the individual <input> tags but that doesn't disable autocomplete for FireFox.
Moving to Web Development - most users here are not web developers, so there will be more people who can help you there.
"All things being equal, the simplest answer is usually the correct one" - Occam's Razor
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0
<code>autocomplete="off"</code> on the form element works for me.
You can't force it to be disabled, you can only suggest it using what Unarmed posted. You can use that attribute in each input field as well. It will result in invalid HTML though. And the user can theoretically override it.
There are articles online (use Google) as well that can help.
Note that autocomplete=off in Firefox disables STORING data for that form, NOT retrieval. So if you had stored data, then added autocomplete=off, your stored data will remain and will autocomplete, but no new data will be added.
Firefox only honors <code>autocomplete="off"</code> on the form, not individual elements (unlike IE).
As a website developer, you shouldn't try to control the user's browser interface. Trying to do so will practically always require nonstandard code, can always be overridden, and is just annoying.
I don't see anything wrong with autocomplete=off when used in certain situations such as:
a) Credit card number entry
b) Entry that would likely not be repeated (such as a call centre rep entering a caller's ID number)
c) Fields from the same server with the same name, but mean different things on different pages (ex: when a moderator wants to add a user, they don't want their own username to autocomplete)
In your opinion... But there are obviously circumstances you have not considered. For example, my situation:
I have 4 moderators on a phpBB forum I administer. I have installed the Moderator Control Panel so my moderators can edit user's information. The User Administration screen includes, among other things, the ability to change a user's User Name or reset a user's Password.
With FireFox's incorrect handling of this situation, the moderator's own username and password are incorrectly applied to the user's fields as soon as the page is loaded, potentially destroying a user account if not reset.
This isn't about trying to control a user's experience. This is about trying to resolve an issue FireFox incorrectly handles.
To automatically fill in the user's Username and Password on a login screen is fine. To do so on a data screen like this not only wrong, it is unacceptable. You are more likely to corrupt the data than save the user time.
In the future, Nanobot, it might be wise to understand what you are offering an opinion about. Your response not only didn't help with my question, it unnecessarily annoyed me. I need help with a technical problem, not a critique of my web design philosophy.
Would it work to add a script to clear out text fields that are supposed to be empty?
That would only work if autocomplete happens BEFORE any onload events, and onload happens AFTER autocomplete... (it should, if I'm right...)
I agree - put autocomplete=off on the form element, too, for good measure.
That might work in most cases, jonnyq. It's a good idea.
In my particular situation though, the Username field is supposed to have the username of the account being edited in it. FireFox overwrites this with the username of the Moderator that is modifying the account.
Yes, this is a known bug (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=112260" title="Bug 112260 - Password manager silently overwrites form-supplied values">Suite</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=229762" title="Bug 229762 - If username field is prefilled by page to a value that matches a stored signon, pwmgr should prefill password">Firefox</a>). The alternative workaround to futzing with the autocomplete value would be to disallow Firefox from saving your username/password for the forum.
Last edited by Unarmed on July 13th, 2005, 2:29 pm, edited 1 time in total.
Yes this is a constant pain in the arse on my phpbb forums as well... the PHPBB creator actually filed a bug in bugzilla about this lemme see if I can dig it up.
Edit: nm unarmed beat me to it.
I'm moving to Theory, everything works there.
Most issues are solved by going through the Standard Diagnostic
Here's what I've implemented as a work around:
Add this script:
Add to the <form tag>:
Change the "username" and "password" field names to "temp_username" and "temp_password"
And add hidden fields to receive the values to be submitted:
So far, it's been working like a charm.
Who is online
Users browsing this forum: Google [Bot] and 0 guests