2

I have troubles getting autofill work for iOS Safari browser in a form where name is parted up into first and last name.

I have tried with this simple example:

<input type="text" placeholder="e.g. John" autocomplete="given-name" name="firstName">
<input type="text" placeholder="e.g. Doe" autocomplete="family-name" name="lastName">

But that only suggest to autofill the firstname.

Here's a codepen: https://codepen.io/simplenotezy-the-looper/pen/PoOoqjx

Options I've tried for autocomplete="":

  • family-name
  • surname
  • lastname
  • last-name
  • lname
  • last name

I've also tried changing the name="" field to names from above list to no avail.

FooBar
  • 5,752
  • 10
  • 44
  • 93

1 Answers1

0

It's disabled by default, you must enable it in your iOS settings

See https://support.apple.com/guide/iphone/automatically-fill-in-forms-iphccfb450b7/ios

Andrea
  • 137
  • 2
  • 11