This topic is locked
[SOLVED]

 Mobile Phone - Call For Phone To Dial Number

4/3/2013 11:31:26 AM
PHPRunner General questions
H
hdpittman author

Good Day!
Does anyone know an easy custom field code that would make the "Phone Number" field open so that another button to "Call" that number will display.
Goal: mobile app "list" that opens my clubs contact list - then you click the phone number - then the phone dials the number displayed
I found this code... <a href="tel:8005551212">800-555-1212</a> but I assume that only dials that 800 number. what would it look like to dial the 'data' that is displayed?
Does the Mobile Template have this feature as an option?
Thanks - HDP

Sergey Kornilov admin 4/3/2013

Many mobile phones will recognize phone numbers automatically and make them callable.
You can also set 'View as' type of the phone field to 'Custom' and use the following code:

$value = "<a href='tel:" . $value . "'>" . $value . "</a>";
H
hdpittman author 4/4/2013

absolutely what I need!!! Thank you!
now I'm on my way to building an app!!! Here is what your code did for me - now click email - phone sends email - click number - phone dials number - click details - and all fields and a map display.
Lovin PHPRunner!!!!

H
herb200mph 5/23/2013

Does the mobile phone, using the href=tel: $value, recognize the phone number with hyphens, re: 000-000-0000, or does the value need to be 0000000000.
Then comes the problem of displaying the number properly as: 000-000-0000.
How is the +1 prefix for out-of-area calls get handled.
We can get the client to enter the +10000000000, but will it display as: 000-000-0000 in the actual view of the datafield?