How to Add a Contact Form to Squarespace

Embed the Helpdesky Contact Form on a Squarespace site using a Code Block. Requires a Business plan or higher.

Adding a Contact Form to Squarespace uses the built in Code Block and takes one paste. The Helpdesky Contact Form drops in as one container div and one script tag, handles its own validation, and lands every submission in your Helpdesky inbox where you can reply by email.

This guide is for anonymous visitors. There is no login, no HMAC, no backend wiring. If you need a portal for signed in users instead, see the Ticket Center Setup Guide.

Why this is the easy choice for Squarespace: 15 conversations a month are free on the Free plan, you do not have to wire up SMTP or pay for a third party form service, and the whole form is one snippet pasted into a Code Block. Replies you send from your Helpdesky inbox are emailed straight back to the visitor.

Set Up Your Helpdesk

Open the Helpdesky dashboard and go to Contact Form in the sidebar. Copy the embed snippet at the top of the page. It already has your Helpdesk ID filled in:

<div id="hdh-contact-form"></div>
<script src="https://helpdesky.io/contact-form.js"
  data-helpdesk-id="YOUR_HELPDESK_ID"></script>

While you are there, also enable messaging from the Messages sidebar item if you have not already. The toggle is at the top of the Messages page.

Plan note: Adding custom JavaScript to a Squarespace site requires the Business plan or higher. The free and Personal plans strip <script> tags from Code Blocks.

Add the Embed Code

  1. Edit the page where you want the form (usually Pages → Contact).
  2. Click an empty area to open the insert panel and choose Code.
  3. Confirm the block type is HTML and that Display Source is unchecked.
  4. Paste the embed snippet:
<div id="hdh-contact-form"></div>
<script src="https://helpdesky.io/contact-form.js"
  data-helpdesk-id="YOUR_HELPDESK_ID"></script>
  1. Save the page.

If you would rather use Code Injection, paste the same snippet under Settings → Advanced → Code Injection → Footer, then add an empty container with ID hdh-contact-form to the page where you want the form.

Test It

Open your live Squarespace site in an incognito window (the editor preview does not always run injected scripts) and submit a test message. The conversation should appear in your Helpdesky Messages inbox within seconds.

If the Code Block shows a placeholder instead of the form, double check you are on the Business plan or higher. Lower tier plans will silently strip the script tag.

Next Steps

Route inbound support email into the same helpdesk by following the Email Forwarding Setup Guide. If you start getting bot submissions, layer on bot protection with the Cloudflare Turnstile Setup Guide. When you ship a signed in dashboard, swap the public form for a Ticket Center so users can see their full conversation history.

Let an AI Agent Reply for You

Running a small business means the contact form fills up while you are busy elsewhere. An AI agent created under Inbox → AI Agents (beta) can answer those messages from your published help articles. Choose Review as its Mode to approve each draft with one click in the inbox, or Autopilot to let it send on its own within the pacing and guardrails you set.

Make sure Contact form is switched on under Behaviour → Channels, otherwise the agent skips conversations that start in your Code Block form. Visitors get the reply by email, no different from a reply you write yourself.

Before anything runs you need your own AI provider key in Settings → AI Settings. Start with Set Up Your First AI Agent, then read the guardrails and pacing guide for delays, daily caps and hand off rules.

Cool Features

A couple of small things you can turn on once the basic form is live.

  1. Hide outer border: drop the form into any section without a background or border so it blends straight into your branding. From the Contact Form page, open the Layout section and toggle Hide outer border.
  1. Cloudflare Turnstile spam protection: if your domain is on Cloudflare, you can protect the form from bots in a few clicks. Open your Cloudflare account, go to Turnstile, add your domain, generate the keys, and paste them into the Helpdesky Contact Form settings. Full walkthrough in the Cloudflare Turnstile Setup Guide.
  1. Allowed Embed Domains: keep other sites from loading the form with your Helpdesk ID. Under Settings → Messages → Allowed Embed Domains, add your Squarespace domain; subdomains are included automatically, and an empty list allows every domain. Details in Restrict Embeds to Specific Domains.

  2. Make the form yours: add Custom Fields of type Text, Text Area, Dropdown, Checkbox or Number; they render between Email and Message and can be marked required. Labels, placeholders, the button text and the success text are all editable, so the form can be in your customers' language. Accent Style paints the button with your Branding colours, Use Branding Background and the colour pickers cover the rest, and the Custom CSS section has a View example snippets library (Brand Colors, Dark Mode / Dark Background, Rounded / Pill Style, Flat / Minimal, Custom Fonts, Full-Width Bold Button, Compact Form). See the Contact Form Setup Guide for all the settings.

Last updated on October 13, 2026