> ## Documentation Index
> Fetch the complete documentation index at: https://docs.surveyowl.co/llms.txt
> Use this file to discover all available pages before exploring further.

# HTML form

> Connect a plain HTML form without adding JavaScript.

Use this option for a static website or any page that can render an HTML `<form>`.

## Add the form

Copy this example into your page. Replace `YOUR_FORM_PUBLIC_KEY` in the action URL with the Public Key shown in the Endpoint form's **General** tab.

```html theme={null}
<form action="https://api.surveyowl.co/v1/submit/YOUR_FORM_PUBLIC_KEY" method="POST">
  <label for="name">Name</label>
  <input id="name" name="name" type="text" required />

  <label for="email">Email</label>
  <input id="email" name="email" type="email" required />

  <label for="message">Message</label>
  <textarea id="message" name="message" required></textarea>

  <button type="submit">Send message</button>
</form>
```

Keep the complete `action` URL and `method` as shown. Change the visible fields to suit your form.

## Return to your website after submission

Without a redirect, the endpoint shows a simple confirmation page. Add this hidden field if you have your own thank-you page:

```html theme={null}
<input type="hidden" name="redirect" value="https://example.com/thank-you" />
```

Use a complete `http://` or `https://` URL. The `redirect` value is used for navigation and is not stored as an answer.

## Add or rename fields

Every value you want to receive must have a `name`:

```html theme={null}
<input name="company" type="text" />
<select name="team_size">
  <option value="1-10">1–10</option>
  <option value="11-50">11–50</option>
</select>
```

The values `company` and `team_size` become labels in **Submissions**. Inputs without a `name` are not sent by the browser.

## Test it

Open the page in a browser and submit one response. Then open the form's **Submissions** tab and check the field names and values.

For custom success and error messages without leaving the page, use the [JavaScript guide](/developer-api/javascript).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.