I need to add an additional field to my custom form, I want to add the name of the credit card.
I tried in the following way:
var cardNameElement = eleme
Elements does not support collecting the cardholder's name at the moment. It focuses on collecting:
If you want to collect the cardholder's name you have to build your own field for the name and submit it to the API during token creation:
var card_name = document.getElementById('card_name').value;
stripe.createToken(card, {name: card_name}).then(setOutcome);
You can see a live example on jsfiddle here: https://jsfiddle.net/7w2vnyb5/