I want to submit my credit card name and numbers and I choose required so it needs to be written. I want to close the form if everything is written. But right now I can click on pay and nothing happens, not even the closing.
this is my code:
cardForm.addEventListener('submit', function(e){
const cardFormData = new FormData(cardForm)
const fullName = cardFormData.get('CardData')
details.style.display = "none"
console.log(cardFormData + fullName)
})
and my scrim: https://scrimba.com/scrim/co060441c952162626eade4ed
you need to push 1 item, scroll down on complete order and should see the consent card. What am I doing wrong?