Contact form widget for WordPress
A form that opens when somebody presses the link your site already has.
Putting it on WordPress
Your widget gives you one line of HTML. It goes in once for the whole site, not once per page, and it does nothing until the trigger you chose fires.
- Where the box is
- Look for a theme option named header and footer scripts, or use a small plugin that adds one — WPCode and Insert Headers and Footers are the common choices. Paste into the footer box.
- What catches people out
- Do not paste it into a post or page with the block editor. WordPress strips script tags out of post content for anyone who is not an administrator, so the snippet appears to vanish and the widget never loads.
<script src="https://kestero.com/widget.js" async data-api="https://kestero.com" data-key="ke_your_key" data-widget="your-widget-id"></script>
The key and the id above are placeholders — copy the real line from your widget’s page.
Every platform, and frameworks — including Google Tag Manager, React and Next.js.
What it is for
A site with Contact in the navigation and nothing much behind it. Somebody presses that link, the form opens over the page, they write, and the message is waiting when you next look. There is no page to build, no route to add and no form service to pay for.
How it finds your link
You hand the widget a CSS selector and it binds to whatever on your page matches. The preset arrives pointing at an element with the id contact, which is a starting point rather than an answer — on most sites that matches nothing, and a selector matching nothing is a link that does nothing. Change it to yours in the editor, then press your own link once to see it open.
When not to use one
Not if nobody opens the inbox. A form is a promise of a reply, and one gathering messages that go unread costs you more than having no form would. Not for support either: there is no attachment, no ticket number and no thread, so what arrives is a name, an address and what somebody typed. A business that needs a conversation with a history behind it needs a helpdesk instead.
Questions
- What do I point it at?
- Anything already on your page — the Contact link in your header, a button in the footer, an item in a menu. You give it a selector and the widget attaches itself to what that matches.
- What happens if the selector matches nothing?
- The form never opens and the page says nothing about it, which is why pressing your own link once is the thing to do straight after changing the selector.
- Can somebody attach a file to it?
- No. A widget takes text, numbers, dates and choices and has no upload in it, which is also why nothing anybody sends can carry a file into your account.
- Where do the messages arrive?
- Under the widget that took them, in your dashboard, newest first. You can read them there and export the lot as a CSV.