Jun 01, '07 07:30:00AM • Contributed by: tb
I found the solution it in Contents/Resources/English.lproj/ABAutoCompleteMappings.plist within the Safari.app package. To open this in the Finder, right-click (or Ctrl-click) on Safari.app 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:
<dict>
<key>ABProperty</key>
<string>Address</string>
<key>ABKey</key>
<string>ZIP</string>
<key>FieldLabels</key>
<array>
<string>zip</string>
<string>zipcode</string>
<string>zip code</string>
<string>postalcode</string>
<string>postal code</string>
</array>
</dict>
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>postcode</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.]
