Languages and runtimes
Handle contact forms without writing a Node.js server
Most integrations post from the browser, which keeps per-visitor spam signals intact. Sometimes you want the submission to pass through your own server first: to enrich it, to check something against your database, or because the form lives behind authentication. Forwarding from Node is a single fetch call.
Setup
Copy your endpoint
Create a form in the dashboard.
Forward from your route
Do your own checks first, then POST the payload through.
Node.js examples
Swap in your own endpoint and these run as-is.
Express. Native fetch, so no dependency beyond Express itself.
import express from "express";
const app = express();
app.use(express.urlencoded({ extended: true }));
app.use(express.json());
app.post("/contact", async (req, res) => {
// your own validation / enrichment here
const upstream = await fetch("https://send.webforms.to/wft_your_key", {
method: "POST",
headers: {
"content-type": "application/json",
accept: "application/json",
},
body: JSON.stringify({
...req.body,
source: "marketing-site",
}),
});
const data = await upstream.json();
res.status(upstream.ok ? 200 : 400).json(data);
});
app.listen(3000);Worth knowing
- Submissions forwarded from your server carry your server's IP, so IP-based spam heuristics and rate limits see one address for every visitor. Post from the browser unless you specifically need the server in the middle.
Node.js form FAQ
Post from the browser when you can: it is one less hop and the request already carries the submitter's IP and user agent, which help spam scoring. Forward server-side when you need to add fields the client must not control, and send the original IP in the payload so scoring stays accurate.
The endpoint replies with JSON when you send Accept: application/json. Check res.ok, then return your own status to the browser. A non-2xx body includes an error code you can log: quota_exceeded and spam_rejected are the two worth handling separately.
When you need to validate against data only your server has, enrich the payload, or when the form sits behind authentication. Otherwise post from the browser and keep the spam signals.
Related guides
Where Node.js submissions can go
The guide above gets the submission to your endpoint. From there it can land anywhere: one destination on Free, several on Pro.
Need the form markup too? The template gallery has complete forms for contact, waitlist, job application and more, and the form generator builds one field by field.
Ready to wire up your Node.js form?
Free for 300 submissions a month. Endpoint in under a minute, no card required.
Start free