formtools / core

The Form Tools Core.
https://formtools.org
207 stars 78 forks source link

How to avoid using three small boxes for a phone number? #499

Open lolekbolek20 opened 5 years ago

lolekbolek20 commented 5 years ago

Greetings,

My boss finds these kind of phone fields a bit annoying because you must tab between the 3 fields or use the mouse.

image

What solution would you recommend to avoid using these boxes? Could we have just a free text field? Or is there a way where the user types 902333333 and it automatically formats it to 902-333-3333? We are not using these phone numbers for automated calls or anything, it is just for our records.

benkeen commented 5 years ago

Yeah, some people don't like the tabbing. (For my part, I dislike the ones that auto-tab into the next field for you - those drive me barmy when you need to change a value.)

The benefit to the separate fields is that validation is very simple. So yes, you could use a regular text field to store the phone numbers but there isn't any sort of auto-formatter to change the input values. You could add a field comment saying Format: xxx-yyy-zzzz or something, but I'm afraid that's pretty much your only option without creating a new field type.

Sorry about that!

lolekbolek20 commented 5 years ago

Thank you for the advice, Ben!

We'll try it as a regular field, we don't use it for any automated tasks, so no big deal.