How to add a whatsapp link in a contact [closed]
closed . This question needs details or to be clearer and is not currently accepting answers.
Want to improve this question? Add details and make it clearer what problem is being solved by editing this post .
Closed 1 year ago .
improve this questionIn my datatable there is a column called contacts, I want to add a link so that when the user clicks there, take the number referring to the variable and call with whatsapp link
<th><?= $properties['contato'] ?></th>
How could I do the same function in a modal
$('#view-property .modal-body').append(`<div><h4><b class="font-modal">Contato:</b> ${property.contato}</h4></div>`);
2
Author: Mike Otharan, 2019-07-18
1 answers
The official WhatsApp API says to use:
Https://api.whatsapp.com/send?phone=countrycode + phonenumber
Logo for its context would look like this:
<th><a href="https://api.whatsapp.com/send?phone=<?= $properties['contato'] ?>">Clique para ligar pelo Whatsapp</a></th>
Remembering that your parameter $properties['contato']
must include the country code of origin of the number, in the case of Brazil is 55
an ex would be: 55ddd9number
5
Author: Vinicius Dutra, 2019-07-18 11:48:09