#ironbeard - card element
1 messages · Page 1 of 1 (latest)
hey there
you mean you want to get the card element instance reference, correct?
(ie, you're not trying to access any card field details, which can't be done)
I think you're just looking for getElement('card') if so: https://stripe.com/docs/js/elements_object/get_element
I think so. I want to be able to listen for the change events, those are sent by the card element instance, right?
Yep! You can pick that up and add a listener
Just be careful not to add duplicate listeners, could get noisy
Gotcha, thanks! Do you know if events from the card element instance bubble up to the initial DOM element, e.g., #card-element?
I don't expect they would, no, but i havent tried that explicitly
Thanks!
NP!
Are you all set now @heady oak ? I need to step away shortly. If you have other questions my colleagues can take over, otherwise I will archive this thread.
have a grand day!
Does the card element happen to send any events when it is 1) filled out and 2) has no errors?
I want to deactivate my submit button until the form is properly filled out
Awesome, thanks 🙂
@heady oak are you all set? Can I archive this thread?
Yeah, looks like I'm good. Thanks L:)