Safari autofill Credit Card

前端 未结 5 491
心在旅途
心在旅途 2021-02-05 23:24

I am trying to use the code below to use \"Safari\'s AutoFill\" of the credit card. But it did not work


&l         


        
5条回答
  •  庸人自扰
    2021-02-06 00:15

    I'm having the same issues, Safari on iPhone simply refuses to populate the credit card expiration field. I tried using a single field, as well as separate fields for the MM and YYYY inputs.

    According to https://html.spec.whatwg.org/multipage/forms.html#attr-fe-autocomplete the autocomplete value depends on whether the input field is wearing expectation mantle or anchor mantle. The latter meaning the field is a hidden input field, in which case on and off is not allowed, but the input should be from a list of autofill field names, listed on the WhatWG page.

    The autocomplete value, as far as I can understand, should hint to the browser, what data to insert during autofill.

    So far, I can't get this to work on Safari either...

提交回复
热议问题