#cupajoe

1 messages · Page 1 of 1 (latest)

tulip larkBOT
raw merlin
#

Good question. Looking in to how to get this info via the address element

#

Out of curiosity, can you tell me what values you do get from value in the change event here?

sullen yoke
#

type: "card"

#

^^ but that's via the card element because I've created the card element with: fields: {
billingDetails: 'auto'
},

#

Which adds the country to the card element

raw merlin
#

Gotcha, that is interesting. I did not realize you could use the address and card element together.

Also apologies but the server got busy and I have not been able to properly look in to this. I am reaching out to my colleague and will get back to you soon with what we can find

sullen yoke
#

Yeah it's a weird edge case alright! That would be great!

#

I did find I could just do: document.getElementById('Field-countryInput').value which gives me the country code but that's a bit of a hack around the problem

raw merlin
#

Wait, is that your own input or is that the address element?

sullen yoke
#

The stripe payment element

#

in the iframe

raw merlin
#

Gotcha, thank you for the clarification, passing that on

sullen yoke
#

Thank you

raw merlin
#

So it looks like this info is only made available on the page after the payment has been confirmed. So unfortunately there isn't an official way to get the selected country from the updated event. The recommended way to do this would be to hide the country dropdown in the element and provide your own input for it