> ## Documentation Index
> Fetch the complete documentation index at: https://formcarry.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Squarespace

> A Squarespace page sends a form to formcarry through a code block that holds a plain HTML form.

Squarespace's own form block sends submissions to an email address, a Squarespace list, Google Drive, Mailchimp or Zapier and has no setting for a custom URL, so it does not post to formcarry.

## Prerequisites

Before you start, you need:

* A formcarry account. [Sign up](https://app.formcarry.com/register) is free.
* A form in the [dashboard](https://app.formcarry.com). Its endpoint is on the form's Setup page. The examples use `https://formcarry.com/s/AbC123xyz`; put yours in its place.

## 1. Add a code block

Edit the page, hover over the section and click **Add block** or **+**, then click **Code**. Click the **pencil** icon on the block to open its editor. Put the block on a regular page rather than a page inside an Index, otherwise the code can fail to render.

## 2. Paste the form into the text field

To send submissions to formcarry, paste a plain HTML form with the endpoint as its `action` and `method="POST"` into the block's text field:

```html theme={null}
<form action="https://formcarry.com/s/AbC123xyz" method="POST">
  <input type="email" name="email" placeholder="Email">
  <textarea name="message" placeholder="Message"></textarea>
  <button type="submit">Send</button>
</form>
```

Leave **Display Source** off rather than on, otherwise the block shows the code as text instead of a form. The form works on every plan: "On all plans, code blocks support plain text, HTML, Markdown, and CSS code surrounded by `<style></style>` tags." The form itself is the one on the [Quickstart](/docs/quickstart).

## 3. Open the page logged out

Open the page in a browser where you are not logged in to Squarespace and check that the form shows. Logged in, the form can be missing while visitors see it: "As a security measure, sometimes your code won't appear when you're logged in, even if visitors can see it."

## Field names

The `name` you write on each input is the field name formcarry stores. Give every field a `name` rather than an `id` alone, otherwise the browser leaves it out of the request. Name the visitor's address field `email`: it becomes the reply to address of the notification email and the recipient of the auto response.

To send files, add `enctype="multipart/form-data"` to the form and a file input with a `name`:

```html theme={null}
<form action="https://formcarry.com/s/AbC123xyz" method="POST" enctype="multipart/form-data">
  <input type="email" name="email" placeholder="Email">
  <input type="file" name="attachment">
  <textarea name="message" placeholder="Message"></textarea>
  <button type="submit">Send</button>
</form>
```

Files are stored on paid plans; on the free plan the rest of the submission is stored without them.

## After the visitor submits

The form has no JavaScript, so the browser posts it and leaves the Squarespace page. The visitor lands on formcarry's thank you page, or on the thank you URL set in the dashboard. The form block's own message and redirect after submitting are form block settings, so they do not apply to a form in a code block.

On a paid plan, `_next` sets the redirect from the form itself:

```html theme={null}
<input type="hidden" name="_next" value="https://example.com/thanks">
```

It applies only while the form's thank you URL in the dashboard is empty, otherwise the dashboard URL wins.

## Spam blocker

Squarespace's **Google reCAPTCHA** is a setting of its form block, so it does not cover this form. The challenges formcarry reads (reCAPTCHA, hCaptcha, Turnstile) load from a `<script>` tag, and JavaScript in code blocks depends on the plan: "Adding JavaScript or iframes to code blocks is available in the Core, Plus, Advanced, Business, Commerce Basic, and Commerce Advanced plans." On those plans, add a challenge from [Spam blocker](/docs/features/spam-protection) and paste its secret key into the form's settings under Form Security.

The honeypot is a hidden input, so it works on every plan. Add it inside the `<form>` tag and leave it empty:

```html theme={null}
<input type="text" name="_gotcha" style="display:none" tabindex="-1" autocomplete="off">
```

A submission that fills it is marked as spam.

## Test it

Submit the form once from the page. The submission is on the form's page in the dashboard, and the notification email arrives at your account's address.

## What's next

* [What every form needs](/docs/what-every-form-needs): field names, hidden inputs, limits and the answers.
* [Thank you pages](/docs/features/thank-you-pages): what the visitor sees after submitting.
* [Spam protection](/docs/features/spam-protection): the challenges, the filter and the honeypot.

Stuck? Write to [help@formcarry.com](mailto:help@formcarry.com). Include the form id.


## Related topics

- [Introduction](/docs/introduction.md)
