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?
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 )
<a href="tel:[types field='phone-number' output='raw'][/types]">[types field='phone-number' output='raw'][/types]</a>
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:
hidden link
hidden link
regards,
Waqar