2
In my datatable there is a column called contacts, I want to add a link so that when the user clicks there, take the number for the variable and call with the 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>`);
On that occasion, as I would put by default the +55 ?
– Mike Otharan
if all the numbers are exclusively from the same country, you can put fixed, directly in the HTML construction as follows: <th><a href="https://api.whatsapp.com/send?phone=55<?= $properties['contact'] ? >">Click to call on Whatsapp</a></th>
– Vinicius Dutra
I updated the question, on the first occasion even works, but on the second where my modal is not working.
– Mike Otharan
In the context of modal you would have to have a link:
$('#view-property .modal-body').append('<div><h4><a href="https://api.whatsapp.com/send?phone=${property.contato}"><b class="font-modal">Contato:</b> ${property.contato}</a></h4></div>');
– Vinicius Dutra