M
M
maratmd2020-08-21 07:30:11
WordPress
maratmd, 2020-08-21 07:30:11

How to forward messages from Elementor pro form to whatsapp or telegram?

Hello, there is a WordPress site with the Elementor Pro plugin. Now all messages from the forms come to the mail, is it possible to somehow redirect messages from the form to whatsapp or telegram? Or from mail to instant messengers?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
Maxim Morev, 2020-08-21
@maratmd

Can.
Order freelance development, or try this , I googled it for you.

A
alexD95, 2021-02-26
@alexD95

for the telegram you need the following:
1) you need to create the telegram.php file (I did it in the crust, it turned out https://mysite.com/telegram.php )
2) you need to insert the following code into this file:

<?php
$txt = "Имя: " . $_POST['Имя'] . " | Телефон: " . $_POST['Телефон'];
fopen("https://api.telegram.org/botID_BOT/sendMessage?chat_id=-ID_CHAT&parse_mode=html&text={$txt}", "r");

where ID_BOT is xxxxxxxxxx:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX id of your bot
. ID_CHAT is the id of the chat.
$_POST['Name'] and $_POST['Phone'] are the fields that are in the form. 6039246fd3f96257311641.png
3) open your form in the elementor, and in Actions After Submit you need to add a webhook
4) after go to the webhook and just add your url, in this case it will be: https://mysite.com/telegram.php

S
serega22, 2022-01-18
@serega22

Hello! how to do for whatsapp? do you have a solution?

S
samsite2000, 2022-01-29
@samsite2000

Hey!
I have empty ones come Name: | Phone:
I haven't tried anything else to insert into the POST value ...
the second line:
$txt = "Name: " . $_POST['name'] . " | Phone: " . $_POST['tel']; - doesn't work... (label fields - name and tel , id fields name and tel respectively)
What's the problem? Help!)))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question