Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
send Whats app or click to chat
send Whats app or click to chat
I am new to the world of programming and my knowledge is very basic or none. How can I send a whats app message with the click to chat. or hyperlink. thanks for the support.
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: send Whats app or click to chat
nuBuilder has no inbuilt function to send messages to WhatsApp.
A quick Google search brought up this article:
https://www.callmebot.com/blog/whatsapp-from-php/
A quick Google search brought up this article:
https://www.callmebot.com/blog/whatsapp-from-php/
Re: send Whats app or click to chat
ok, I understand, and generating a hyperlink concatenating the phone to make it work, example
https://wa.me/1XXXXXXXXXX?text=I'm%20in ... for%20sale
I would appreciate it very much
https://wa.me/1XXXXXXXXXX?text=I'm%20in ... for%20sale
I would appreciate it very much
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: send Whats app or click to chat
To compose the URL, you can use this function:
Example:
To open the link:
Code: Select all
function getLinkWhastapp(number, message) {
message = encodeURIComponent(message);
return `https://wa.me/${number}?text=${message}`;
}
Code: Select all
getLinkWhastapp('+your_number_here', 'hello');
Code: Select all
window.open(getLinkWhastapp('+your_number_here', 'hello'))
Re: send Whats app or click to chat
Once again I request your support, I have a client table where there is a mobile phone field. This will be used to send the message by whatsapp when clicking on the button. but I can't make the phone number change in the link.
Here are the screens of how I'm doing it but nothing happens. I thank you once again for your support.
I have tried to concatenate two fields without success. I can't understand how the fields work in nubuilder. My experience is only in microsoft access but it is no longer functional.
Here are the screens of how I'm doing it but nothing happens. I thank you once again for your support.
I have tried to concatenate two fields without success. I can't understand how the fields work in nubuilder. My experience is only in microsoft access but it is no longer functional.
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: send Whats app or click to chat
thanks kevin for the support provided.
I already made the word change (String with constand) nothing happens. I add examples
explain.
I have a table called customers. with the phone number field. Generate a button to send a service message. This must send the message for each record, that is, each time a client is consulted, the button must take the telephone number of the client that is consulted and send the message if the user clicks on the button.
Another way that I use is this code but the number of the selected record is not put either
window.open("https://api.whatsapp.com/send?phone=521 ... lo%20There!");
I really appreciate your help a lot.
I already made the word change (String with constand) nothing happens. I add examples
explain.
I have a table called customers. with the phone number field. Generate a button to send a service message. This must send the message for each record, that is, each time a client is consulted, the button must take the telephone number of the client that is consulted and send the message if the user clicks on the button.
Another way that I use is this code but the number of the selected record is not put either
window.open("https://api.whatsapp.com/send?phone=521 ... lo%20There!");
I really appreciate your help a lot.
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: send Whats app or click to chat
System.out.println() is Java, not JavaScript.
If the phone number is stored in a text field, you can retrieve it with telefono_movil.value
Write
Instead of
If the phone number is stored in a text field, you can retrieve it with telefono_movil.value
Write
Code: Select all
const phoneNumber = telefono_movil.value;
Code: Select all
const phoneNumber = 'telefono_movil';
Re: send Whats app or click to chat
first of all thank you. for your support.
I already replaced the code, add the .value and without it since the field is number. sql base screen is attached.
and nothing happens. There will be another way to make it possible using other options, be it sql, html, etc.
I already replaced the code, add the .value and without it since the field is number. sql base screen is attached.
and nothing happens. There will be another way to make it possible using other options, be it sql, html, etc.
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: send Whats app or click to chat
Compare my code
With your code
Code: Select all
const phoneNumber = telefono_movil.value;
Code: Select all
const phoneNumber = 'telefono_movil'.value;