I see with a Text field you can add an Input Mask to format a telephone number, But I don't see see a way to add the same type of input mask to the Telephone field? Am I missing something, or is it intentionally not there?

Comments

kruser created an issue. See original summary.

luke.leber’s picture

Telephone numbers are very complex. A simple input mask isn't a reliable mechanism here, as number formats do vary wildly from country to country.

There's an international telephone mode feature for this that ships with country-specific masking capabilities 👍.

jrockowitz’s picture

Status: Active » Closed (won't fix)

You can create a custom telephone input mask for a specific number, but we can't include it with the module.

@see https://robinherbots.github.io/Inputmask/#/documentation

alexandremush’s picture

I am using Drupal 10.4.7 and webform module 6.2.9.
When I add a telephone type field to a form, it does not have a mask in its settings. But if I add a text field instead of a telephone type, and set up an input mask in it, and then convert it to a telephone type, we get a telephone field with an input mask. And it works!
Perhaps it makes sense to add this feature to the telephone field. Whoever needs it can use their own custom mask.
thanks!