Firefox’s Form Autofill Issue
When you go to web pages with forms, most modern web browsers will try and help you fill in the form by remembering what you typed into a form in the past. So if you start typing your name into a field that is depicted as a “name” field, then the browser will offer up suggestions as you type. This is a great thing.
But once upon a time I typo’d my email address in a form….instead of cdh@carlhutzler.com I entered cdh@carlhutzer.com. I don’t recall what form it was for, but I think I realized it when I never got email from that site. No big deal, I just re-did the form on that site and went along my way.
But what happened was that Firefox remembered my typo. So now when I fill in forms with email addresses, I would get two suggestions for my email address…one correct and one typo. Worse yet, the typo one was the first choice. This has stung me a few times when I was in a hurry so today I searched for the fix.
Turns out Firefox stores form suggestions in a file called formhistory.sqlite located in /Users/someuser/Library/Application Support/Firefox/Profiles/someprofile.default/formhistory.sqlite
I opened the file in a text editor initially just to see if I could find the typo and it was there. Before I made any changes, I made a copy of the file (for me it was a 700KB file…and not something I could afford to f-up). After making a copy, I tried to make the correction by changing the text to the correct spelling of my email address. I figured it would simply have two “Correct” spellings after that change. But the edit I did made the form file not work anymore. Thank god I made a backup.
So I went to versiontracker.com and looked for anything in the Mac OS X area that allowed browsing and editing of SQLITE database files. I found MesaSQLite. Once I downloaded the software (shareware), I was able to open the formhistory file (even double-click to open) and search for the typo email address. I played with the table and field search settings till I found which one had the data I needed:
table=moz_formhistory value=<my typo'd email address>
I edited (in my case deleted) the record and COMMITed the change. Put the changed formhistory file in place of the old file and restarted Firefox.
No more typo!
12 comments12 Comments so far
Leave a reply



Man, did you go the long way around… next time, if you see a Firefox auto-fill item that you want to delete, just highlight it and press Shift-Delete (works on Mac or Windows).
Jeez. I am a luser^2
Nah, I’m sure you learned valuable things.. besides, it’s timely:
XKCD #530
WOW! Someone else sent me that cartoon just yesterday. And I forwarded it to a friend stating “It’s funny, but sad that I actually understood everything.”
Jay–your tip is a lifesaver. I don’t know where it’s documented in Firefox. I found this post while I was trying to do the same thing Carl did. Shift-delete is a whole lot easier!
oh, and I understood everything in the XKCD comic too. You could do the same joke with household repairs, too.
Hey you are not a looser man this post helped me. After finding out shift-delete did not work (my mistake entries would still reappear in the url bar and also clearing data in firefox prefs did not work either) I thought the only solution was to do the about:config hack and turn autofill off completely. I even updated to the firefox 3.5 beta4 and had the same problems. After stumbling on your post I started to mess with MesaSQLite and the “formhistory.sqlite” file unfortunately the typo url data I was trying to access was not in that file and my problem persisted, however in that same directory “/Users/someuser/Library/Application Support/Firefox/Profiles/someprofile.default/” the file “places.sqlite” did the trick I quit out of firefox, opened the “places.sqlite” file in MesaSQLite and under Table Name I selected moz_places under that I selected id and clicked the show all button. A list of all the urls I visited came up I scrolled through and found the typo url I was looking for hi-lighted it and pressed delete quit MesaSQLite opened firefox and BAM no typo url. Either way thanks a bunch man you laid the foundation for my solution.
My OS is Mac os 10.5.7 and the problem was occurring since 10.5.5 using firefox 3.0.10 and 3.5 beta4
You are all way above my head, but I would like to ask a question.
Jay, firefox used to autofill my username and password when I signed on to aol. I had to change my password and now nothing. I looked in about:config and “signon.autofillForms and signon.rememberSignons are both TRUE, but I do not know how to get back to where my info is automatically inserted.
Is there an easy way to fix this?
Thanks.
@Ann: Sorry, I triple don’t know; I never use AOL anymore, I stopped using Firefox (too slow/buggy on a Mac, and Safari 4 is blazing fast), and I use the excellent, cross-browser, but Mac/iPhone-only 1Password extension to do all my password-remembering.
That said, http://support.mozilla.com (NOT .org!) has been revamped lately, and I’ve had pretty quick responses the last few times I asked questions there…
Just go into “Preferences” and under “Privacy” uncheck the box that says “Remember what I enter to forms and the search bar” and restart the browser.
Thanks for the post! I had the same thing happen, but because I’m a True Typing Genius(tm), I had /several/ mispellings in the autofill. :)
The modifier-delete trick didn’t work, and I tried a whole bunch of different modifiers. This seems to have done the trick, ad opened my eyes to the answers to a few other questions which I had about that data.
And compared to the xkcd strip, yours was not nearly as long a way around. :)
I had a similar problem, but my firefox auto fill lists for logins/passwords/forms on sites no longer worked. My solution was simply to delete the file:
/Firefox/Profiles/someprofile.default/formhistory.sqlite
then restart firefox and it rebuilds the file from the formhistory.dat file – some corruption must occur in the sql file which the .dat one is succeptible to.