Passer la navigation

[Résolu] Phone number display

This support ticket is created Il y a 2 years, 4 months. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Fuseau horaire du supporter : Asia/Karachi (GMT+05:00)

Ce sujet contient 1 reply, a 2 voix.

Dernière mise à jour par Waqar Il y a 2 years, 4 months.

Assisté par: Waqar.

Auteur
Publications
#2681096

What is the best way to display a phone number so it looks something like this? +1 555-555-5555

Also, is there a way to make it clickable on a smartphone?

#2681188

Hi,

To make the phone number value from a Toolset custom field, a clickable phone link, you can use its shortcode in the HTML link like this:
( ref: https://toolset.com/documentation/customizing-sites-using-php/functions/#phone )


<em><u>lien caché</u></em>

Note: you'll replace 'phone-number' with the actual field's slug.

The Toolset's phone number type field doesn't apply any formatting restriction to the entered numbers, and the values are saved as entered, including the numbers, special characters like the '+' sign, and spaces.

If you'd like to apply a certain input masking to the front-end forms, you can use custom script libraries. Here are some useful guides on the topic:

lien caché
lien caché

regards,
Waqar

#2681437

Thanks!