Zunoy header logo
All Products
Resources
HTML Integration

HTML Contact Form with
only Frontend Code

Start collecting form submissions from your HTML form with FormSubmit in 2 minutes. Create your form in FormSubmit and
paste your unique URL inside your form. Check out the code examples and detailed tutorial below to get started.

Vs Code

  import { useState } from "react";

  export default function Fetch() {
    const [email, setEmail] = useState("");
    const [message, setMessage] = useState("");

    const [submitted, setSubmitted] = useState(false);
    const [error, setError] = useState("");

    function submit(e) {
      e.preventDefault();

      fetch("https://formsubmit.com/s/XXXXXXX", {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          Accept: "application/json",
        },
        body: JSON.stringify({ email, message }),
      })
        .then((res) => res.json())
        .then((res) => {
          if (res.code === 200) {
            setSubmitted(true);
          } else {
            setError(res.message);
          }
        })
        .catch((error) => setError(error));
    }

    return (
      <form onSubmit={submit}>
        {/* Form implementation */}
      </form>
    );
  }
  

How to Integrate Code

What is HTML?

HTML (HyperText Markup Language) is the standard language for creating web pages. With FormSubmit, you can easily collect form submissions from your HTML forms without needing a backend.

FormSubmit Setup with HTML using Fetch

Fetch is a built-in JavaScript API that allows you to send form data easily. Below is an example demonstrating how to send form submissions from an HTML form to FormSubmit using Fetch. Ensure that you replace “https://formsubmit.com/s/XXXXXXX” with your unique endpoint URL.

Vs Code

  import { useState } from "react";

  export default function Fetch() {
    const [email, setEmail] = useState("");
    const [message, setMessage] = useState("");

    const [submitted, setSubmitted] = useState(false);
    const [error, setError] = useState("");

    function submit(e) {
      e.preventDefault();

      fetch("https://formsubmit.com/s/XXXXXXX", {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          Accept: "application/json",
        },
        body: JSON.stringify({ email, message }),
      })
        .then((res) => res.json())
        .then((res) => {
          if (res.code === 200) {
            setSubmitted(true);
          } else {
            setError(res.message);
          }
        })
        .catch((error) => setError(error));
    }

    return (
      <form onSubmit={submit}>
        {/* Form implementation */}
      </form>
    );
  }
  

FormSubmit Setup with HTML using Fetch

Fetch is a built-in JavaScript API that allows you to send form data easily. Below is an example demonstrating how to send form submissions from an HTML form to FormSubmit using Fetch. Ensure that you replace “https://formsubmit.com/s/XXXXXXX” with your unique endpoint URL.

Vs Code

  import { useState } from "react";

  export default function Fetch() {
    const [email, setEmail] = useState("");
    const [message, setMessage] = useState("");

    const [submitted, setSubmitted] = useState(false);
    const [error, setError] = useState("");

    function submit(e) {
      e.preventDefault();

      fetch("https://formsubmit.com/s/XXXXXXX", {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          Accept: "application/json",
        },
        body: JSON.stringify({ email, message }),
      })
        .then((res) => res.json())
        .then((res) => {
          if (res.code === 200) {
            setSubmitted(true);
          } else {
            setError(res.message);
          }
        })
        .catch((error) => setError(error));
    }

    return (
      <form onSubmit={submit}>
        {/* Form implementation */}
      </form>
    );
  }
  

FormSubmit Setup with HTML using Fetch

Fetch is a built-in JavaScript API that allows you to send form data easily. Below is an example demonstrating how to send form submissions from an HTML form to FormSubmit using Fetch. Ensure that you replace “https://formsubmit.com/s/XXXXXXX” with your unique endpoint URL.

Vs Code

  import { useState } from "react";

  export default function Fetch() {
    const [email, setEmail] = useState("");
    const [message, setMessage] = useState("");

    const [submitted, setSubmitted] = useState(false);
    const [error, setError] = useState("");

    function submit(e) {
      e.preventDefault();

      fetch("https://formsubmit.com/s/XXXXXXX", {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          Accept: "application/json",
        },
        body: JSON.stringify({ email, message }),
      })
        .then((res) => res.json())
        .then((res) => {
          if (res.code === 200) {
            setSubmitted(true);
          } else {
            setError(res.message);
          }
        })
        .catch((error) => setError(error));
    }

    return (
      <form onSubmit={submit}>
        {/* Form implementation */}
      </form>
    );
  }
  
Setup Forms

Easy setup : 3 Steps to Setup FormSubmit

LeftDots
RightDots

1.Create a New Form

Display how reliable your service has been over time.

2.Setup Your Form

Show status for each part of your service to pinpoint issues faster.

3.Track & Explore Forms

Create pages in multiple languages to reach all your users effectively.

USe CAses

Need templates? Say less.

A collection of example HTML forms with code that you can edit live, then download or copy/paste. A minimal form reset css is included that should work with most sites. A minimal form reset css is included that should work with most sites. A minimal form reset css is included that should work with most sites.

  • Simple Contact Form
  • Survery Form
  • Book a Demo Form
  • News Letter Form
  • Registration Form & more...
Learn More
timeLine
email

Email

sms

SMS

voice

Voice call

slack

Slack

zapier

Public API

telegram

Telegram

webhook

Webhooks

discord

Discord

teams

Microsoft Teams

Integrations

Effortless Integrations
for Smarter Workflows

Seamlessly connect your workspace with the tools you already use. With webhook support, get instantly notified about new submissions, ensuring you never miss important data while keeping your workflow running smoothly.

Show All Integrations

Any questions?
Check out the
FAQs

Still have unanswered questions and need to get in touch?

Still have questions?

Fill a Form

Don't like phone calls?

Write a Email

Go to the Integrations tab, select an app with a webhook, add it to your workspace, and link it to your form for real-time submission updates.

Create a form in your workspace, get its submission API, and integrate the POST API into your actual form to start collecting submissions.

Yes! Invite team members to your workspace via the Collaborators tab, and they can help manage form submissions.

View, filter, and organize all submissions in the dashboard for easy tracking and management.

Yes! Enable real-time notifications and receive updates via email or integrated platforms like Slack, Discord, and Microsoft Teams.

Yes! Whether you're an individual, a small team, or a business, FormSubmit adapts to your needs with flexible features and collaboration options.

Ready to explore Zunoy?

Let’s get Started

Copyright © 2025 - Mentcube Innovations Pvt Ltd. All Rights Reserved.

FormSubmit