Skip to content
CartTuck
Menu

Squarespace Add to Cart form: file upload field

Updated · by the CartTuck team

Short answer: Squarespace’s Add to Cart forms (product forms) don’t have a file upload field. Every field saves a short text answer on the order line item, and none of them accepts a file. You can still collect a file through the form by letting a script turn a Text field into an uploader that stores a reference to the file as the answer. That’s how CartTuck works, and this page explains the mechanics so you can set it up with confidence.

How Squarespace Add to Cart forms work

You attach a form to a product, and shoppers fill it in when they add that product to their cart. On Squarespace 7.1 the form usually opens after the shopper clicks Add to Cart, and the item only goes into the cart once the required fields are filled in.

Each answer is saved with that line of the order. You see the answers on the order in Squarespace, and apps can read them through the Squarespace Orders API, where every line item carries a customizations list of label and value pairs, such as { label: "Engraving", value: "Love, Sam" }. Because answers belong to a line item, two of the same product in one cart keep their own answers.

Why there’s no file upload field

A form answer is a short piece of text; a file is not. Accepting files means storing them, limiting their size, checking they’re safe, keeping them private and deleting them later. None of that fits in an order record, and so far Squarespace hasn’t added it. Merchants have asked on the forum many times:

Using a Text field to carry a file

The workable pattern keeps Squarespace’s form in charge and stores the file somewhere built for files:

  1. You add an ordinary Text field to the product form, with a label the script can recognize.
  2. A script loaded on every page watches for the Add to Cart form, finds the field by its label, hides the text box and shows an uploader in its place.
  3. The uploader sends the file straight to secure storage, then writes a short reference code, like CT-7K2QXM, into the hidden text box so Squarespace sees a filled-in field.
  4. Squarespace saves that code as the field’s answer on the line item, exactly as it would save typed text.
  5. When the order arrives, the app reads the order, finds the code, and links the stored file to that order and line item.

This approach doesn’t touch the cart or checkout, it keeps Squarespace’s own required-field check, and each Add to Cart gets its own code. Finding the field by label rather than by template-specific markup is what keeps it working across 7.1 templates.

What you’ll see on the order

In Squarespace, the order line shows the field and its code, for example CartTuck file: CT-7K2QXM. In the CartTuck dashboard, the same order shows the actual files with their size, dimensions and any print check result, plus buttons to download one file or a zip of the whole order. If the code turns up in an order email, it’s harmless: it’s a reference, not a link, and files can only be downloaded from your signed-in dashboard.

Setting up the field

  1. Install CartTuck and paste its script into the site-wide Footer code injection box (see the install guide).
  2. Open the product in Squarespace and add a form to it, or edit the form it already uses.
  3. Add a Text field labeled CartTuck file. To use another label, change it in the CartTuck product settings first, then match it exactly.
  4. Turn on Required if the product can’t be made without a file.
  5. Save, then test on your live site: click Add to Cart and check that the uploader replaces the text box.

Common mistakes

  • Label mismatch. “CartTuck File” or a trailing space won’t match “CartTuck file”.
  • Script on one page only. 7.1 loads pages without a full reload, so the script must be in the site-wide Footer box.
  • Testing in the editor. The Squarespace editor doesn’t always run injected code. Test on the live site.
  • Basic plan. Code Injection starts at Core. On Basic, use the post-checkout upload page (Maker, Pro and Studio plans) instead.
  • A 7.0 template. CartTuck supports Squarespace 7.1 sites.

Frequently asked questions

Does the Squarespace Add to Cart form have a file upload field?

No. Squarespace product forms offer fields for text and choices, and every answer is saved as text on the order. There is no field type that accepts a file.

Can I put an upload in a separate form block on the product page instead?

You can, but a separate form isn’t connected to the cart. Its submissions arrive on their own, not on the order, so you have to match them to orders by hand. An uploader inside the Add to Cart form avoids that.

Does Squarespace’s Required toggle still work with CartTuck?

Yes. The hidden text field only gets its value when the upload finishes, so Squarespace won’t let the item into the cart until then. If a product blocks files that are too small to print and the file fails, the field stays empty and the shopper sees why.

Can one product take more than one file?

Yes. Each product has one upload field, and you choose how many files it accepts, up to 10. All of them are attached to the same line of the order.

What if a shopper’s browser blocks the script?

They see the plain text field instead of the uploader. Link your post-checkout upload page (Maker, Pro and Studio plans) in the product description so those shoppers can still send their file, attached to their order.

Stop chasing files by email

Connect your store, paste one line of code and add one form field. Every new store gets Pro free for 14 days, then stays on the Free plan unless you choose to upgrade.