3

I followed the instructions at When is the Scan Credit Card option available on iOS8 Safari? and added

 :name => "cardNumber"

and it correctly gave me the option to scan credit cards. That being said, the option also appears on the CVC code text input which I do not want to happen. Here is the html:

<label class="h4">Card Number</label>
<input autocomplete="cc-number" class="form-control js-card-number unknown" id="number" maxlength="19" name="cardNumber" placeholder="•••• •••• •••• ••••" required="required" size="19" type="tel" value="">
<label>Expiration</label>
<input autocomplete="cc-exp" class="form-control js-card-exp-date" id="expiry_date" name="expiry_date" placeholder="MM/YY" required="required" type="tel" value="">
<label>Security Code</label>
<input autocomplete="off" class="form-control js-card-cvc" id="verification_value" name="verification_value" placeholder="•••" required="required" size="5" type="tel" value="">

It will gives the option to Scan and will fill the credit card correctly for Card Number, gives no option to scan for the Expiration, and gives the option to scan but does not work for Security Code. I don't want the scan option to appear on the CVC field and I'd love for the Expiration field to get populated correctly (I am using the MM/YY format, can I accommodate for that somehow?).

Thanks

Community
  • 1
  • 1
Eric Walsh
  • 3,035
  • 1
  • 16
  • 21
  • I have seen a similar problem http://stackoverflow.com/questions/30599381/ios-credit-card-autofill-persists-on-drop-down-inputs However I have copied your 'cvc' input into my test and it doesn't offer autofill. I can only replicate it on selects and text areas. As this is 4months old, have you had any luck since? – Matt Derrick Jun 03 '15 at 09:08
  • @MattDerrick unfortunately I wasn't able to find an acceptable solution at the time and have not touched over the topic recently. That being said there may be more literature out there now that the Card Scanning feature has been around and is being adopted by many companies. – Eric Walsh Jun 03 '15 at 16:42
  • It's 2023 is this still impossible? – John DeBord Jun 16 '23 at 02:21

0 Answers0