Hi Steve,
I know how to get the event up, but when I put the function code in, nothing happens. The code I have looks like this right now:
export function input44_change(event) {
//Add your code for this event here:
function formatPhoneNumber(phoneNumberString) {
var cleaned = (‘’ + phoneNumberString).replace(/\D/g, ‘’)
var match = cleaned.match(/^(1|)?(\d{3})(\d{3})(\d{4})$/)
if (match) {
var intlCode = (match[1] ? ‘+1 ’ : ‘’)
return [intlCode, ‘(’, match[2], ‘) ‘, match[3], ‘-’, match[4]].join(’’)
}
return null
}
formatPhoneNumber(’+12345678900’) // => “+1 (234) 567-8900”
formatPhoneNumber(‘2345678900’) // => “(234) 567-8900”
}
Input 44 is the user phone number input.
could it be a code problem perhaps?
Thanks,
Anney