[Drupal] How to start a call when a user clicks on a number in a mobile version of a Drupal website

| | 1 min read

One of our Drupal clients requested us for a feature in a mobile version of their Drupal website in which, a user accessing the mobile version of their website, should be able to automatically initiate a call on clicking the telephone number appearing in the website. If you want to know "How to start a call when a user clicks on a number in a mobile version of a Drupal website, then continue reading.

To automatically initiate a call when a user clicks on a link in a website we could use the "tel://" or "tel:". The tel protocol allows us to make a call from the mobile website. This tag will automatically populate phone numbers into tel: hyperlinks instead of normal link.
Eg:

(xxx) xxx-xxxx
(yyy) yyy-yyyy

While clicking on the link, the dialer will pop up, and shows the number in the phone number field. The user then just click on the call button.

Hope this Helps.