Any way to make autoform field live-validate/correct phone number?


#1

I was wondering if there’s some way to make @aldeed’s autoform do a live correction as someone is typing in a phone number field.

So for example, as they start to type 818, it changes to (818) in the field. All formatting is handled in real-time. In the end, if they had typed 8185551212, the field would actually display (818) 555-1212.

Is this doable?


#2

You can register Template.event keypress for input field and parse and modify as you wish