#Vankesh-autofill
1 messages · Page 1 of 1 (latest)
Hi @timid umbra ! Could you clarify exactly what you are trying to accomplish, and share the "js example" you are mentioning?
Hello @ancient wadi ! thanks for your help. Sure, i try to autofill credit card number on the stripe js credit card form from browser saved payment method (google chrome for instance).
For now i have an error output (not sure if it comes from Stripe or directly from chrome).
I used this example as adviced by @frank lance yesterday :
const element = elements.create('card', {
style: {
base: {
iconColor: '#c4f0ff',
color: '#fff',
fontWeight: '500',
fontFamily: 'Roboto, Open Sans, Segoe UI, sans-serif',
fontSize: '16px',
fontSmoothing: 'antialiased',
':-webkit-autofill': {
color: '#fce883',
},
'::placeholder': {
color: '#87BBFD',
},
},
invalid: {
iconColor: '#FFC7EE',
color: '#FFC7EE',
},
},
});
from this doc : https://stripe.com/docs/js/appendix/style
So you would like the Stripe Element form to be automatically pre-filled with the user's card saved in their browser?
exactly (sorry if i'm not clear 😦 )
Thanks for the clarification! But I don't think that can be done automatically. It's the end user who needs to select the card they want to auto-fill. And when that happens, the code you shared above will only change the style of the input.
ok understood. But even if i want to manually select my saved payment method i cant make it work.
To clarify even more i use a password manager and it's working as expected with the pasword manager (Dashlane). But not with the payment method saved in google chrome.
Ok my bad i'm an idiot, i did try on local env and obviously its not plugged 😦 Sorry for the loss of time