Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Fix Safari AutoFill to recognize "Postcode" for Australia Web Browsers
Safari's "AutoFill Form" (Cmd-Shift-A) function is useful for quickly entering name and address details in a web page from your "own" address card in Address Book, but it fails to complete what we call the "postcode" in Australia. Probably because it's looking for a field labelled "zip code", I assumed, and Australian web forms have this labelled "post code" or "postcode". So I wondered if this was configurable.

I found the solution it in Contents/Resources/English.lproj/ABAutoCompleteMappings.plist within the package. To open this in the Finder, right-click (or Ctrl-click) on in the Applications folder, select "Show Package Contents", then navigate to Contents -> Resources -> English.lproj. Make a backup of ABAutoCompleteMappings.plist (Cmd-D does this nicely), then open ABAutoCompleteMappings.plist in Property List Editor (if you have Developer Tools installed) or any text editor.

If you are using a text editor, you will find the following starting at or around line 134:

                                <string>zip code</string>
                                <string>postal code</string>
So now we know that Safari responds to a field labelled "zip" or variants (for the USA obviously) or "postalcode" with optional space (I guess for the UK and/or Canada).

I duplicated the "postal code" line twice, then modified the new entries to add "postcode" and "post code" to the array:

                                <string>postal code</string>
                                <string>post code</string>
If using Property List Editor, add the extra entries to Root-> Mappings-> 11-> FieldLabels.

Save the file, restart Safari and test. This works for Mac OS X ver 10.4.9. Other versions may vary in the details.

[kirkmc adds: I haven't tested this. Obviously, this may also be useful for people in other countries, or working in other languages. Also, you may want to check some of the other keys in the file if you find that, in your country or language, you often have fields that don't auto-fill.]
  • Currently 3.17 / 5
  You rated: 2 / 5 (6 votes cast)

Fix Safari AutoFill to recognize "Postcode" for Australia | 4 comments | Create New Account
Click here to return to the 'Fix Safari AutoFill to recognize "Postcode" for Australia' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Fix Safari AutoFill to recognize "Postcode" for Australia
Authored by: adrianm on Jun 01, '07 10:36:40AM

Strange, I've never had this problem, and I live in the UK where we too have postcodes.

I just tried a random selection of web sites wanting address info and Cmd-Shift-A worked perfectly in all of them.

Example, has a field called m_ZIP but it still fills in my postcode OK.

I wonder if there is some other issue. Using latest 10.4 and latest Safari.

~/.sig: not found

[ Reply to This | # ]
Fix Safari AutoFill to recognize "Postcode" for Australia
Authored by: adrianm on Jun 01, '07 10:41:37AM

Ah, sorry, I misread. I see what you mean.

Instead of hacking the English localisation, I'll dupe it and make it a British English localisation instead.

~/.sig: not found

[ Reply to This | # ]
Another variation
Authored by: tb on Jun 03, '07 06:22:02AM
Autofill will not fill in the suburb or town of your address unless it is labelled "city" in the web page.

Can be fixed in the same file, a few lines above the postcode fields. Find the line:

and insert the line:

A good site to test this on: Try before and after.

[ Reply to This | # ]

Another variation
Authored by: optogamut on Jun 03, '07 06:20:34PM

Cheers, worked for me!

Now I need to buy some chocolate... ;)

[ Reply to This | # ]