Hello Coders,
Is there a way to connect the whatsapp click to chat feature to a text box containing a phone number? I have done till here:
export function phonenumber_click(event) {
let phonenumber=$w("#phonenumber").text;
let phonenumber_link="https://api.whatsapp.com/send?phone="+phonenumber;
$w("#phonenumber").XXXXXXXXXXXXXXXXXXXXXXXX==phonenumber_link.
I need to assign the variable phonenumber_link to the phonenumber text element so that when the user clicks on it, their whatsapp is automatically opened for messaging. I tried using this :
$w("#phonenumber").link=phonenumber_link.
But its showing an error and unfortunately I couldn’t find any way to assign that link to a text box(phonenumber ). Do you guys have any idea? Thanks
Update: I just found that there is a function called to() in wix-location. It solved my issue.