Navigation überspringen

[Gelöst] Phone number display

This support ticket is created vor 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 -

Zeitzone des Unterstützers: Asia/Karachi (GMT+05:00)

Dieses Thema enthält 1 reply, hat 2 Stimmen.

Zuletzt aktualisiert von Waqar vor 2 years, 4 months.

Assistiert von: Waqar.

Author
Artikel
#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>versteckter Link</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:

versteckter Link
versteckter Link

regards,
Waqar

#2681437

Thanks!