Have you ever wanted to add a link to a button or hyperlinked text to send a text message?
Better yet, what if the link had pre-populated text?
That'd be pretty slick. Well, keep reading to find out how to accomplish this simple yet powerful tactic.
Determine the phone number you want the text message sent to including the country code and area code. For this example, we will use +14055551230
Use a URL encoder such as this one to write your message you would like to have pre-populated. Here's an example message: Hi%2C%20I%20just%20read%20your%20article%20on%20how%20to%20create%20a%20text%20link.%20I%20plan%20to%20use%20it%20for
Use this format to bring together step 1 & step 2: <a href="sms:{step 1}&body={step 2}">{text to display}</a>
This is what the example code would look like:
<a href="sms:+14055551230&body=Hi%2C%20I%20just%20read%20your%20article%20on%20how%20to%20create%20a%20text%20link.%20I%20plan%20to%20use%20it%20for">Send me a Text</a>
Try it out here:
<a href="sms:+14055551230&body=Hi%2C%20I%20just%20read%20your%20article%20on%20how%20to%20create%20a%20text%20link.%20I%20plan%20to%20use%20it%20for"> <button>Send me a Text</button></a>