Form2SMS – Instructions

  • Why not share:
  • Social sharing button for Facebook
  • Social sharing button for Linkedin
  • Social sharing button for Twitter
  • Social sharing button for Googleplus
  • Social sharing button for Pinterest

Form2SMS javascript free download form to send sms text message

This article details how to obtain and configure the Form2SMS script to use on your website.

IMPORTANT: You must have a Text Marketer account before you start as the ID in the script is unique to each account.

Then, login to your account and go to SETTINGS | FORM2SMS SETTINGS – then configure the options on the screen and test your form script live as shown below. The Form2SMS script will automatically be configured as you change the options. Once you’re happy with the test you’ve received, you can copy and paste the Form2SMS script directly to your web page.

The script will look something like this. Please see below script for configuration options and explanations.


<script type="text/javascript" src=""></script>
<FORM id="TMadbox" name="TMadbox" method="POST" action="" onsubmit="return validateTMbox(this);">
<INPUT type="hidden" name="ID" value="[this-will-be-your-unique-ID]" />
<!-- Redirect URL after form submission 1=Stay on Same Page or enter URL like -->
<INPUT type="hidden" name="Redirect" value="1" />
<!-- Add number to a group in your Text Marketer account 1=yes,0=no -->
<INPUT type="hidden" name="AddToGroup" value="1" />
<!-- The name of the Group in your system (a-z/0-9 only, no special characters).
A new group will be created if it doesn't exist -->
<INPUT type="hidden" name="GroupName" value="XYZ Product Out of Stock" />
<!-- Up to 11 alphanumerics (a-z/0-9 only, no special characters, including spaces) or a 16 numerics only -->
<INPUT type="hidden" name="SenderID" value="XYZ Ltd" />
<!-- The content on the text message. Maximum of 612 characters including spaces. -->
<INPUT type="hidden" name="Message" value="This is where the text message goes." />
<!-- Number of accepted uses from a visitors IP address in 24h. Default 10, maximum 100. -->
<INPUT type="hidden" name="SubIP" value="10" />
UK Mobile Number:
<INPUT type="text" maxLength="13" name="MobileNumber" />
<INPUT type="submit" name="Submit" value="Submit" />

The variables shown in bold/red above are the elements you can configure – namely;

- ID – this will be automatically generated in your account when you get the script

- Redirect – this is where the visitor will go after submitting the form. It defaults to 1 which means they will stay on the same page. Otherwise enter a redirect URL in the format shown. This may be a thanks page for example.

- AddToGroup – if you want to capture the mobile numbers entered in your Text Marketer account, leave to 1 for yes, else 0 for no.

- GroupName – this is the name of the Group to add numbers to in your Text Marketer account. If the Group already exists it will add the numbers to that. If not, it will create the Group in your account when the first number is entered. A number will not be added to the group if it already exists but they will still receive the text.
If you were using Form2SMS across a whole site, you might configure this as the product group name on a page, e.g. Camping Enquiries, Tent Enquiries, Caravan Enquiries, etc.. That way, all the numbers captured will be in specific group names, meaning you could run more tailored follow up text campaigns. Numbers will not be captured if there is no group name.
Numbers & letters only in this field. No special characters such as $, £, & etc.

SenderID – this is the name or number that will appear on the inbox on the phone. It can be up to 11 alphanumerics (including spaces) or 16 numerics (in other words a full international format number). If you want the ability for people to be able to reply to texts sent, you might want to consider a virtual mobile number. There must be something in this field if you want to return a message.
Numbers & letters only in this field. No special characters such as $, £, & etc.

Message – this is the body of text message. It can be up to 612 characters in length, including spaces. If you do not want to send a confirmation message back then simply leave this blank. The number will still be added to your group (so long as that is enabled).

SubIP – this is a protection feature to help against ‘spamming’ from your form. If this is set to 10 for example a single visitor (from the same IP address) can only use your form 10 times in any 24 hour period. The minimum is 1 and the maximum is 100.


What does it cost?
The script and the system to capture numbers is free. There is only a cost if you return a confirmation text. This is charged per message at our low bulk SMS prices. You simply add credits to your account on a pay as you go basis. Credits do not expire once added. But, if you’re using it simply to collect mobile numbers then it won’t cost you anything.

What if my account runs out of credits – will the confirmation messages stop?
Yes, the confirmation message won’t go out but the numbers will still be captured. There is a low credits warning system on accounts (which you can set to whatever you like) which will send you a warning email and a text message to ensure you don’t run out.

Will it work for non-UK numbers?
Yes, it will so long as you have requested your account to be an international account. You should also note that non-UK users will have to enter their mobile number in full international GSM format, i.e. including country code and dropping the leading zero.

Couldn’t somebody ‘flood’ the form with mobile numbers and if I was returning a message end up costing me all my credits?
It is highly unlikely. You can set the number of times any 1 IP address can use the form to send a message so you have control over that. As an absolutely worst case scenario, should you be targeted by NASA-level-hackers, your liability will only ever be the total number of credits in your account. Once they are depleted, the confirmation messages will stop.

Can I export all the data that I’m collecting?
Yes, as a CSV or Excel document. Go to GROUPS | UPLOAD NUMBERS TO A GROUP in your account and you’ll see an export option there. When you open a Text Marketer account, you get a full text marketing system, rich in features. You will receive instructions when you open an account. You may also wish to have a look through our online instructions to see how your account works.


Related articles

  1. Generate free QR Codes
    QR Codes are a great way to get response from your mobile marketing adverts and even from web sites. Although...