Claude Code guide

How to add a backend to a Claude Code form backend

Ask Claude Code to scan your project and update the most relevant form component.

No backend API route Honeypot spam trap Works with any host
FS Formserve Team Product guides
Claude Code Stack
4 steps setup Walkthrough
Form <form action="…" method="POST"> in the browser
Formserve Validates & filters spam, then stores the submission
Deliver Notifications sent to email, Slack, Sheets, or webhooks
Why a backend at all

The browser can't handle the submission on its own.

An HTML form has to POST somewhere. Formserve is that destination — it receives the submission, screens it for spam, stores it, and sends the notifications. No server to run, no serverless function, no fragile scripts.

Ask Claude Code to scan your project and update the most relevant form component.

§ 01 · Context Why it still needs a backend.

Claude Code is useful when you want an existing codebase updated with minimal manual editing. Formserve works well here because the backend contract is small: preserve the current form UI, submit to the endpoint URL, keep POST, and include the hidden _honeypot field.

The form POSTs to an endpoint URL, the submission is stored, and notifications are sent according to the endpoint settings. It's a safer, more maintainable replacement for fragile mailto: patterns or one-off scripts that break the first time your host changes.

§ 02 · Why More than just an email alert.

When the backend stores every submission first and notifies second, you get three things a raw SMTP relay can't give you:

Inbox plus notifications

Every submission stays searchable in the Formserve inbox — not just buried in one person's mailbox.

Spam stopped first

Allowed domains, honeypot fields, rate limits, and blocklists run before any notification is sent.

Route later if needed

Start email-only, then add Slack, webhooks, Sheets, or a CRM later without touching the form.

And because the submission is stored, delivery failures stay visible instead of disappearing into email logs. If a notification bounces, you can see it, retry it, and still have the lead.

§ 03 · Setup How to connect it.

None of these steps involve writing server code. First, make sure you have the essentials in place:

Existing project form

Have the target form already present in the codebase so Claude Code edits the right component.

Formserve endpoint URL

Generate or copy the endpoint URL from Formserve first.

Prompt instructions

Tell Claude Code to preserve styling and avoid creating a new backend route.

Named fields

Make sure the rendered inputs use stable name attributes.

1
Generate the AI prompt in Formserve — Use the AI Prompt tab and select Claude Code so the instructions are already tailored.
2
Ask Claude Code to scan for the most relevant form — Let it find the contact, waitlist, quote, or lead form already in the project.
3
Keep the change minimal — Only update method, action, field names, submit handling, and friendly feedback states.
4
Review changed files and test — Run the project and send a real submission after the edits are applied.

§ 04 · Example Keep the form simple.

There's nothing special about the markup. The only required change is the action attribute. The hidden _honeypot input is the one spam-prevention field worth adding by hand:

claude-code.html — minimal
Update the existing contact, waitlist, or lead form in this project to submit to Formserve.

Use this endpoint:
https://formserve.io/f/YOUR_ENDPOINT_KEY

Requirements:
- Set the form method to POST
- Preserve the existing design and styling
- Keep the current form component
- Ensure inputs have proper name attributes
- Add a hidden _honeypot field
- Show success and error feedback
- Do not create a new backend API route unless absolutely necessary
No fetch required for the basic case.

A plain action + method="POST" works with zero JavaScript. Reach for fetch only when you want to stay on the page and show a custom success state.

Before you launch

  • Review which form component Claude Code selected.
  • Confirm the generated code still preserves the current UI.
  • Send a real test submission from the running app.
  • Verify the submission lands in Formserve before enabling integrations.

Common mistakes

  • ! Letting Claude Code create a new backend route when a direct POST would work.
  • ! Accepting a refactor that changes the form styling unnecessarily.
  • ! Forgetting to include a hidden _honeypot field.
  • ! Testing only the frontend state instead of a real submission.

Get a working endpoint in under a minute.

Paste the URL into your form's action and send a test. Free up to 100 submissions / month — no credit card.

Try without signup

§ 05 · FAQ Common questions.

Do I need to build a backend for a Claude Code form backend?
No. Formserve is the backend. You point the form at a Formserve endpoint URL and it stores submissions, filters spam, and sends notifications, so you never build or host a server yourself.
Does this work with Claude Code?
Yes. A Claude Code form submits standard named fields, and Formserve accepts them the same way any HTML form posts data — no SDK or plugin required.
Will connecting Formserve change my form design?
No. You keep your existing markup and styling. Only the submission behaviour changes so the form posts to your endpoint instead of a server you maintain.
How do I stop spam without a CAPTCHA?
Add the hidden _honeypot field shown in the code sample and set a spam protection level on the endpoint. Formserve blocks bots invisibly instead of showing a CAPTCHA.
FS
Formserve Team
We build the form backend behind thousands of HTML forms — from one-page contact forms to high-traffic launch pages.
Claude Code Guide No-code