Formatting a Phone Number

In a Contact Us page, I’ve got a text field that is set as Telephone Number. As the user enter their number, I’d like to format the number in the form xxx-xxx-xxxx.

If I use the On Text Change method, and insert a “-”, then the text changes, and then said method is executed again. Wouldn’t this be a never-ending cycle?

Do you know how to format a telephone number?

Show what you have tried.

Use regex for it

https://regexr.com/3c53v

/Boban

2 Likes