card
card copied to clipboard
Add ability to initialize Card with data and on inputs
We've had frequent requests for the ability to initialize card without the inputs, or with inputs, but the data prefilled. I'd like to make this happen.
Here's the basic spec of what needs to happen:
- A user should be able to pass in an object to the Card initializer that creates a new Card with all the relevant values (number, expiry, card type, cvc).
- A user should be able to pass in a masked number (see #179, #153) and have the card type still be set
- A user should be able to initialize Card like this, then have the selected
input
fields override the data as they are changed and/or filled.
Am I missing anything here that other people would like?
If you'd like to help me make this happen, I'd love to support in any way I can. Check out the Contributing Guidlines or ping me on Twitter.
This would be indeed very useful
+1
Would love to be able to use this to display information about a saved card, without needing a form at all.
any progress on this issue ?
@jessepollak , do have at least an idea how to implement this ?
Hello @Fivell, if you need to set data in the form. Just fire keyup events to show the card.
It works for me!
var evt = document.createEvent('HTMLEvents');
evt.initEvent('keyup', false, true);
document.getElementById('
@mkrypka , I need to implement ui looks like (full credit card number should be masked for security reasons)
https://github.com/jessepollak/card/issues/179#issuecomment-117641899
Is it possible mask(hide) part of card number from animated-card-image? Like '4111 **** **** 1111' ? And leave input field as it is now(all numbers are visible).
+1 For this feature
+1 for mask / hide feature
+1
This would be amazing, any progress here?
@mkrypka thanks man
Is setting the card type supported?
Is it already supported or not?
I need this feature too. Anyone already implemented?
Is this ready?