# HTML contact form without a backend: a working example

Build a static HTML contact form that sends to email and Telegram without PHP or your own server. Includes a copyable form, redirects, and delivery checks.

Author: Formgong
Published: 2026-10-01
Language: en
Canonical: https://formgong.com/blog/html-contact-form-without-backend?lang=en

A static HTML contact form can work without a backend you maintain: set method=POST, the Formgong /submit action, and a hidden access_key. After email verification, the service receives submissions and sends notifications. The plain HTML version does not require JavaScript.

## What “without a backend” means

A browser can submit an HTML form without JavaScript, but something still has to receive the data, save it, and deliver notifications. Here, Formgong does that job. You do not maintain a PHP script, an API, or a database; there is still a processing server, operated by the form service.

This is suitable for a landing page, portfolio, or static site with text fields. If you already have a backend with authentication and complex business rules, handling the form there can make sense. Choose a separate workflow for files: this example sends text only.

## 1. Get the key for your form

Open [Formgong](/?lang=en#top), enter your email, and verify it using the link in your inbox. Then open your form in the dashboard and its Connect website section. Copy the public submission key.

Replace `fk_your_access_key` below with that value. The key allows submissions, not inbox access or settings changes. It can appear in HTML. You do not need an email provider's secret or a Telegram bot token here.

Verify your email before testing delivery: submissions for an unverified account may be held pending confirmation.

## 2. Add the HTML to your website

Paste this into your page's contact section. It contains no visual styles; add your own classes to the fields and button to match the site. You can translate the labels. Keep the `name`, `email`, and `message` field names as shown.

```html
<form action="https://formgong.com/submit" method="POST">
  <input type="hidden" name="access_key" value="fk_your_access_key">
  <label>Name <input type="text" name="name" required></label>
  <label>Email <input type="email" name="email" required></label>
  <label>Message <textarea name="message" required></textarea></label>
  <div aria-hidden="true" style="position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden">
  <label>Leave this field empty<input type="text" name="botcheck" tabindex="-1" autocomplete="off"></label>
</div>
  <button type="submit">Send</button>
</form>
```

## Why method, action, and name matter

`method="POST"` sends fields in the request body. `action` sets the receiving endpoint. Each field's `name` determines what is sent; an `id` alone is not enough. For a phone field, use a name such as `name="phone"`.

`botcheck` is a bot trap. Keep it off-screen and empty; do not turn it into a visible required field. When it is filled, Formgong can accept the request as spam without sending notifications.

A plain form does not need `fetch`. The browser sends the data and navigates to a result page. `required` and `type="email"` help visitors complete it, but do not replace the service's checks.

## 3. Choose the page after submission

Without extra configuration, the browser opens Formgong's result page. To use your own thank-you page, publish it on your website and enter its full HTTPS URL in your form's redirect settings.

Alternatively, add a hidden `_redirect` field with the full page URL. If the dashboard is set to ignore redirect addresses from code, the settings URL takes precedence. You can also set `_error_redirect` for failures.

Want visitors to stay on the same page? Add JavaScript with `fetch` and explicit submission states. The [delivery troubleshooting guide](/blog/contact-form-not-sending-email?lang=en) includes a response-checking example.

## 4. Test the published form

- Open the site on its real domain, fill the form manually, and send a recognizable test message.

- Open that form's Submissions in the dashboard. Check the message and any additional fields.

- Check the recipient's email, including the spam folder.

- Repeat on a phone: labels, the email keyboard, button, and thank-you page should be usable.

For another notification channel, [connect Telegram](/blog/website-form-to-telegram?lang=en). Changing recipients or redirects in Formgong does not require publishing your HTML site again.

## Before enabling additional protection

When enabling Turnstile, refresh the code in Connect website. The form needs a widget with the current site key and a `cf-turnstile-response` field. The example above includes only a honeypot and is insufficient when Turnstile is already required.

If you configure allowed domains, include the website's real domain. Tests in an editor or on another preview domain may behave differently. See the [HTML integration documentation](/docs/html?lang=en) for the full setup.

## Frequently asked questions

### Can an HTML form work without JavaScript?

Yes. A form with method=POST and a Formgong action is submitted by the browser. The response opens a result page or your configured thank-you page.

### Does a static contact form need PHP?

No, when an external service receives the data. Formgong handles it in this example, so your website hosting does not need PHP or a custom API.

### Can access_key remain in HTML?

Yes. It is a public submission key. It does not grant inbox reading access or permission to change settings.

### Does this example work when Turnstile is enabled?

The example includes a honeypot. If the form requires Turnstile, add the current widget and cf-turnstile-response token from Connect website.

## Sources and documentation

- [MDN: sending form data](https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Forms/Sending_and_retrieving_form_data)
- [Formgong HTML integration](https://formgong.com/docs/html?lang=en)

[Get a form key](https://formgong.com/?lang=en#top)
