Add a callback form to your website for lead generation

Updated 1 min read

If you want to collect visitor phone numbers from a website button or link, a callback form lets visitors request a call from the chatbox. This guide shows how to connect the form to an HTML link or button and enable it in your widget settings.

txt.me offers a built-in form for your visitors to requests a phone call back right from the chatbox.

How to trigger the callback form from a website?

There should be a button, a link, or any other element on your website that you would like to use for lead generation and collect the visitor’s phone number the moment they see it.

Let’s connect this element to the call-back request form.

In this case, simply change the href=”” to this link:

javascript:txtme.api.openWidget(['show_call_me_back']);

So the link would be seen as:

<a href="javascript:txtme.api.openWidget(['show_call_me_back']);">Call me</a>

Connect the call-back form to an HTML button, <button> or <input>

For a button the code will be slightly different, we will need to override the onclick event:

<button onclick="txtme.api.openWidget(['show_call_me_back']);">Call me</button>

Turn the form on for your widget

The phone icon and the form itself can be turned on and off on the Appearance > General page.
Just check the check box and Publish the changes.


That’s all!
Now you can collect leads from any button on your website.

Put an AI agent and a real person on your website chat

Start free with one agent and unlimited chats. Add the AI agent, WhatsApp, email and Human Backup operators when you need them.