# Connect a website form to FormCargo

This workflow works with ChatGPT Codex, Claude Code, or a developer. The Free
launch saves submissions in a form's inbox. Paid notifications and the public
management API are not needed for setup.

## Give your coding agent this task

> Connect this site's existing contact form to FormCargo using the installation
> snippet I provide from the form's Setup tab. Preserve the site's design,
> accessibility, field labels and existing validation. Follow this workflow.
> Do not request API keys, sign-in codes, cookies or provider credentials.
> Show me any hostname change or deployment you need before publishing it.

## 1. Create the form

Sign in at https://formcargo.com, create a workspace and a form, then open its
Setup tab. New forms are live and accept any website until you list one. To
restrict them, turn on Allowed websites in the Security tab and add the domains
you own; Local testing (on by default) keeps `localhost` and `127.0.0.1` on any
port working while you develop.

Choose Named or Private and copy the installation HTML. Private addresses use
`https://in.formcargo.com/{publicId}`; named addresses use
`https://in.formcargo.com/{workspace-handle}/{form-name}`. The public ID and
address are intended to be placed in your site's HTML; they are not API keys.
Use the actual address from Setup rather than inventing one or using a database
document ID. A workspace handle is permanent.

## 2. Connect the existing site

The coding agent should:

1. Find the actual form component and its submit handler. Keep the existing
   layout, labels, keyboard behavior, required fields and success/error region.
2. Set the form action to the copied address and its method to `post`. Keep
   meaningful `name` attributes on every submitted field. Match field types and
   required fields to the FormCargo form configuration.
3. Copy the honeypot, ALTCHA widget and protection script from the same Setup
   snippet. The challenge URL must be the selected action plus `/challenge`.
   Do not mix a named action with a private challenge or remove bot protection.
4. Check for an existing JavaScript handler that prevents the native submission.
   Adapt it to the documented snippet behavior rather than leaving two competing
   submit paths. Never hard-code a proof, turn off verification or send twice.
5. Respect the site's Content Security Policy. If the exact snippet needs a
   policy change, explain the required trusted origins; do not disable CSP or
   use a wildcard as a workaround.
6. Never put a backend/admin secret or a management token into client code.
   Setup requires only the public installation snippet.

If your page has no form yet, use the New form snippet in Setup and add it to a page on your own site.
Keep JavaScript enabled: no-JavaScript email confirmation is not part of the
Free launch. File uploads are not supported.

## 3. Verify through the browser

First run the site's normal lint/types/build checks. In a real browser, load the
site from an allowed origin and submit one clearly marked synthetic inquiry
(for example `setup-check-2026-11-14-unique-marker`). Use an example.invalid email
address, not customer information. Confirm the bot challenge loads and the site
shows the actual result rather than displaying success before the response.

The owner should confirm the same marker appears once in the correct FormCargo
inbox, and can open/export it. A screenshot, mocked fetch or a successful build
does not prove the submission was saved. A closed collection gate is a blocked
live test; do not bypass it or report acceptance. Report the hostname, test marker,
observed response and inbox verification without copying customer data or tokens.

Do not automatically retry a timed-out request with a new identity. When using
an integration that supplies `Idempotency-Key`, retain the same key for the same
payload's retry; use a new key only for a new inquiry. Never deliberately flood
production or exhaust a real workspace's capacity as part of setup.

Delete only the synthetic submission you created after the owner has verified
it. Summarize the changed files, checks and any remaining deployment or live-test
step. Publishing the site follows the owner's deployment authorization.

## If it fails

- Wrong website: check the exact origin against the allowed website list, or
  turn on Local testing for `localhost` pages.
- Challenge failure: check the copied widget/script and matching challenge URL.
- Collection unavailable: check the form's Setup diagnostics and launch status.
- Full inbox, history or abuse protection: report the rejection; never weaken
  the controls or show success for an unsaved submission.

Contact support@formcargo.com if setup remains blocked. Expected first reply:
within two business days, Monday–Friday IST.
