smartformify
Pricing
Form Endpoints

Connect HTML, JavaScript, React, and Next.js forms

2 min read

Keep your website's form and design. Connect it to a SmartFormify endpoint to receive answers in your response dashboard.

Connect your form

  1. Open your endpoint, enable it, and copy the full submission URL and generated integration example.
  2. Add the example to your website. Give each input a name and keep the generated hidden bot field empty.
  3. Publish the form, submit one test, and confirm it appears in the correct form's response dashboard.

For developers

A normal HTML form uses method="POST" and the endpoint URL as its action. For a JavaScript submission, call event.preventDefault() in the submit handler and send the named fields as JSON or FormData. This JSON example sends text fields:

const response = await fetch("YOUR_ENDPOINT_URL", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    data: { email: "you@example.com", message: "Test enquiry" },
  }),
});
const result = await response.json();
if (!response.ok || !result.success) {
  throw new Error(result.message || "Submission failed.");
}
// Show confirmation or follow result.data.redirect_url.

In React, use the form's onSubmit handler. In Next.js, browser submit handlers belong in a Client Component with 'use client'. Show a loading state, disable repeat submissions while sending, and preserve entered values on failure.

Common questions

Why does the page reload?

A normal HTML POST navigates after submission. For a form that stays on the page, use Fetch and call preventDefault() before awaiting the request.

Why are fields or checkbox values missing?

Inputs need a name; disabled inputs and unchecked checkboxes are omitted. When converting FormData to JSON, use getAll() for repeated field names: Object.fromEntries() keeps one value per key. Let the browser set Content-Type when sending FormData.

How do I prevent duplicate responses?

Use one submit handler and block repeat clicks while sending. If retrying an uncertain request, check the dashboard first. JavaScript or server integrations can reuse an Idempotency-Key for the same unchanged submission; its replay protection is temporary and does not replace the in-flight guard.

Complete examples: HTML, JavaScript, React, and Next.js.

Related articles

Keep going with the next product setup task.

Fix missing form submissions

If an answer is missing, check whether the website sent the form, whether the endpoint accepted it, and whether you are viewing the correct response dashboard. Check these first...

Fix CORS and connection errors

Endpoints accept browser and server submissions without website restrictions. You do not need to add a website domain or forward Origin or Referer headers. Check the connection...

Understand submission limits

A limit can come from repeated requests, a daily allowance, your account's plan, or a restriction set on the form. Read the message before retrying. Choose the right next step...

Was this helpful?

Your answer helps us improve the Help Center.

Contact support