2

I'm trying to find documentation on how Safari maps user AutoFill profile data to HTML form input fields. Clearly it's doing some sort of matching on the name attribute, but that's no longer working correctly on our forms. All I can find on Apple's site is end-user documentation. I'm hoping there's some magic Safari-only data attribute I could inject into the HTML to make it work correctly.

Background:

We recently (2Q-3Q 2014 or thereabouts) began getting an extra copy of the customer's ZIP code in the field we use for a name suffix, like "Jr," "Sr", "DVM" etc. Was able to associate this behavior with user-agent strings ending Safari/537.* Fairly confident it's Autofill because important form modifications trigger Ajax calls and the very first one had all the contact info. (Filled by hand usually results in multiple ajax calls.)

Not being able to find any better standard, I seelcted the ECML v2 (RFC 4112, https://www.rfc-editor.org/rfc/rfc4112) field names many years ago. It's the input name="Ecom_ShipTo_Postal_Name_Suffix" that's getting the extra copy of the ZIP code. Fortunately, we are also getting the ZIP code in Ecom_ShipTo_Postal_PostalCode where it should be.

Thanks for your help.

1 Answer 1

1

It's very much an embarrassing oversight that HTML5 inputs using type= do not include fname, lname, address, city, state, zip, country. That being said, we usually just use simplistic name instead, such as name="postalcode" and set type="text" -- it seems to work out ok.

That ietf page you linked is still just proposed and a memo, its not standardized. Honestly I've never even seen that name="Ecom_Flag_Name" convention used on any platform, whereas name="postalcode" style is used in many places. See if simplifying those names has any effect.

2
  • You're of course correct that RFC 4112 has not been widely adopted, however I haven't seen anything else that is as comprehensive. See also xml.coverpages.org/ecml.html for more about its history. Anyway, I'm sure I could play a guessing game and come up with something that Safari plays nice with today. But I'd much rather rely on their specification if it can be found rather than just guess. Commented Oct 31, 2014 at 20:37
  • @DavidBrown yeah I hear ya, but its not really a guess. A staggering percentile of live sites and open platforms use name="postalcode" which means it's a "real-time standard" regardless whether it's accepted by RFC or not. search.nerdydata.com/search/#!/…
    – dhaupin
    Commented Oct 31, 2014 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.