Prerequisites
Before you start, you need:- A formcarry account. Sign up is free.
- A form in the dashboard. 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 itsaction and method="POST" into the block’s text field:
<style></style> tags.” The form itself is the one on the 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
Thename 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:
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:
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 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:
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: field names, hidden inputs, limits and the answers.
- Thank you pages: what the visitor sees after submitting.
- Spam protection: the challenges, the filter and the honeypot.