Sending SMS - SOLVED


#1

Probably this is not the best place to put this question, but it will not hurt… and probably it will help other users:

In iOS the code to send SMS is:

sms:1234&body=message

In Android the code is:

sms:1234?body=message

For Both the code is:

sms:1234;?&body=message

So with the help of my friend Mr. Google, I create a HTML widget with the following code to generate a form that with the SUBMIT button send the SMS with the correct syntax and it is:

<form action="sms:" method="get">
<input type="number" name=":">
<input type="hidden" name="body" value="Text&nbsp;example&nbsp;in&nbsp;SMS">
<input type="submit" value="Submit">
</form>

But when I press submit opens iMessage and the number goes to the correct place and the message goes to the correct place but in the number field appears a “=“ symbol before the number, do you know what I’m doing wrong?


SOLVED IN THIS POST:


#2

Hi @Pealco

I believe there is something wrong in this process.

As I understand you collect the client’s number from the “form input” and on “form submit” you want the message app to open with collected number.

That would mean the client would be sending himself an SMS ?

MDS


#3

Hello @MDS Thanks for you answer,
No, some equipments that I use, have to be programmed by SMS sending a code to the SIM card that the equipment have.
So the code is more or less like this:
You want to change the equipment password:
Send a SMS to the number of the equipment with following syntax:
#1234#pass#7777
So 1234 is the old pass; pass is the code to be recognized by the equipment; 7777 is the new password
To make a button to create this code only needs to add a link to that button to a URL, and in the URL write:
sms:11111111;?&body=#1234#pass#7777
And if is a plain url like this in the button, everything is OK, but I want forms to put:
Number of the equipment: 11111111111
Password: 1234
The syntax is a hidden form with the value “pass”
New Password: 7777
And a submit button to create the complete code: (sms:11111111;?&body=#1234#pass#7777)

Did you understand? In this way the client can change the password without remembering the full code, only fill number of equipment, old password, new password and send!!!

For different codes different forms, etc, etc, etc.

So in the end is not to collect any data, only the client uses my web app to fill the form and the sms goes directly from his phone to the SIM card of his equipment.


#4

HI @Pealco

Okay now it make sense. I’ll try to have a look tomorrow.

MDS


#5

Hi @Pealco

Tried my best these last days to find a solution but my skills here do not appear sufficient. Sorry. Hope you’ll find a solution.

MDS


#6

Hello @MDS, I found a way to make it work, do you want me to share in here? Or just close this Topic?


#7

please… that would be great!


#8

Happy you found a solution.

It would be great to share - this is what the forum is for.

Thanks in advance.

MDS


#9

OK @KBConcepts @MDS @Eldar I will try to explain everything:

In iOS the code to send SMS is:

sms:1234&body=message

In Android the code is:

sms:1234?body=message

For Both the code is:

sms:1234;?&body=message

So I start with the last code for both and had try it and it works perfectly in both systems.

  • Simply send a plain text (TTTT) to a number (NNNN) from a button:
  1. Create a button, and on the right bar in the Mode > Normal Mode > Interactions

  2. Choose in Type:
    Navigate to URL

  3. In the URL write: sms:NNNN;?&body=TTTT
    But in Blocs the “&” symbol is not recognized so you have to change it to “&amp;


  • Create a costum sms with a field to input a personalized number (1234) and then a send button that already have the rest of the text (TTTT) predefined:
    I can’t create it with buttons, so I use a different approach:
  1. Create a Structure that you want, then add a Code Widget.

  2. Create the field to write the costum number:

<input type="text" id="phone" required="" style="width: 100%;text-align:center;">
  1. Create the Button to call the personalized number and add it to the SMS code:
<button type="button" name="submityes" id="submityes" class="btn btn-primary btn-block" onclick="window.location='sms:' +  $('#phone').val() + ';?&amp;body=TTTT'">SEND SMS</button>

  • Finally create a personalized number and a personalized text in front of the predefined text (TTTT):
    I can’t create it with buttons, so I use a different approach:
  1. Create a Structure that you want, then add a Code Witdget.

  2. Create the field to write the personalized number:

<input type="text" id="phone" required="" style="width: 100%;text-align:center;">
  1. Create the field to write the personalized text:
<input type="text" id="secondtext" required="" style="width: 100%;text-align:center;">
  1. Create the Button to call the personalized number and the personalized text and add it to the SMS code:
<button type="button" name="submityes" id="submityes" class="btn btn-primary btn-block" onclick="window.location='sms:' +  $('#phone').val() + ';?&amp;body=TTTT' + $('#secondtext').val()">SEND SMS</button>

In the buttons you can choose from ACTIVE buttons or DESACTIVE buttons, change colors, sizes, with, etc.
In the fields, you can choose from text, email, password, number, create max caracteres, change the size of the field, put a value, etc.


Hope that this explanation helps other users, it take me ages to find out a way to work in all devices, but with this way it will work with iOS, MAC Mojave, Android. About others OS’s systems don’t know, because I doesn’t have them.

This can be used to:
Share your URL in the site to others by SMS.
Create like a SMS templates.

The advantage from this way to others is that you don’t need to use outside servers, or operators to send the SMS and the personal information, doesn’t go to others, just creates the sms directly in the client equipment.

Let me know what you think, and I’m here to help.


#11

That was really cool of you to take the time to put that together.
It sounds like you got this to work without any issues.


#12

Yes is working fine, when I finish my WEB App I’ll put the link in here.
I only had one problem, in one of the sms code I need the # symbol and in iOS I put it strait and it works, but not in Android in that case I use the code %23 and both iOS and Android recognized it as #.


#13

I’m looking forward to seeing that. :slight_smile:


#14

Thanks for sharing! I’m happy that you have found a solution!


#15

Great. Many thanks for sharing.

MDS