/Contact-Form

The Lightweight Contact Form which send contact requests on your Telegram

Primary LanguageJavaScriptApache License 2.0Apache-2.0

Contact Form


Features :

  • Cool Layout
  • Message goes on your Telegram
  • 7 KB of JS Code
  • Serverless Backend (Cloudflare Worker)
  • One Line of Integration

Deploy :

Setup the Backend 👇

  • Create a Telegram Bot from Botfather & Grab the Token.
  • Goto your created bot and send /start.
  • Now GoTo userinfobot send it any message it will give your Telegram ID (9 Digit) and copy the ID.
  • Open cf-worker.js and copy the whole code.
  • Go to Cloudflare Workers and create a worker & paste the copied code.
  • Replace the BOT_TOKEN & CHATID with your previously copied Bot Token and User ID.
  • Save and Deploy & copy the Worker Url

Connect it with your website 👇

  • Paste this Script :
<!--- 
    error_text: Message to display if there is an error.
    success_text: Message to display if the form is successfully submitted.
    disable_waittime: If true, it will not froze a new form subission (after one is successfull) for half a day.
    form_worker_url: URL to the cloudflare backend.
  -->

<script
  src="https://cdn.jsdelivr.net/gh/tuhinpal/contact-form@master/src/contact-form.min.js"
  id="contactform"
  error_text=""
  success_text=""
  disable_waittime="true"
  form_worker_url="https://contact-form.tprojects.workers.dev/"
></script>

Use The Backend API 👇

  • This is very simple too, Just do a POST request with this JSON Body
{
  "name": "Tuhin Kanti Pal",
  "phone_no": "000000000",
  "email": "me@thetuhin.com",
  "subject": "Just a Testing",
  "message": "Just a Testing"
}

Connect :

License & Copyright :