DEV Community

YOGESHWARAN R
YOGESHWARAN R

Posted on

Make your form to work perfectly with Telegram

Make unworking contact or feedback forms to work. Here is a simple script that makes your form work. All the form data in your form are sent to you as a Telegram Message.

Here is the Quick Demo

Refer GitHub for more details

GitHub logo yogeshwaran01 / formBot.js

Make your contact and feedback form to work perfectly with Telegram

formBot.js

Make your form to work

If form is submited, all form data are send to you as telegram Message

Qucik Demo

Click here for quick demo

Simple Usage

<script src="https://cdn.jsdelivr.net/gh/yogeshwaran01/formBot.js@1.2.0/formBot.min.js" ></script>
Enter fullscreen mode Exit fullscreen mode

In index.html

  • Name the id of your form as formBot
  • set new attribute names. value of names is name of all input elements eg: name="name mail message". Here name, mail, messgage are the value of name attribute of input elements.
  • set other attribute chatId of your telegram. Get chat id from Telegram Bot.
<form id="formBot" names="name mail message" chatId="104753182211">
    <label for="name">Name</label>
    <input type="text" name="name">
    <label for="mail">Mail</label>
    <input type="text
Enter fullscreen mode Exit fullscreen mode

Top comments (0)