[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 741
  • Last Modified:

Can we have iphone prompt the SMS screen with a pre populated message & phone#?

I have a mobile web page with a link when clicked on an iphone
should prompt the SMS screen with a pre-populated message and
a pre-populated phone# in it.

right now below is the code we are using, and its not working.

<a href="sms:12345678900?body=messagebodyhere">Send me a text</a>

if we just use         <a href="sms:12345678900">Send me a text</a>

It works, but it doesn't populate the body of the text message.

I'd like to it work where someone clicks a link, the SMS screen opens,
and both the phone# and the text message are pre-populated, so all
the user has to do is touch "send" to send the SMS.

Does anyone know how to make this work?
0
myddotorg
Asked:
myddotorg
1 Solution
 
Michel PlungjanIT ExpertCommented:
From the developer site:



Text Links

Note: Text links are supported on iOS only.

The sms scheme is used to launch the Text application. The format for URLs of this type is “sms:<phone>”, where <phone> is an optional parameter that specifies the target phone number of the SMS message. This parameter can contain the digits 0 through 9 and the plus (+), hyphen (-), and period (.) characters.
The URL string must not include any message text or other information.

The following examples show strings formatted for Safari and for native applications.

    HTML links:

    <a href="sms:">Launch Text Application</a>

    <a href="sms:1-408-555-1212">New SMS Message</a>

    Native application URL strings:

    sms:

    sms:1-408-555-1212

iOS Note: If the Text application is not installed on the device, clicking an sms URL displays an appropriate warning message to the user.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now