# Forms

A form that posts to /__sharepa/formular stores every entry for you. You see the entries in the app, get an email when new ones arrive and download them as CSV. There is nothing to set up.

Source: https://sharepa.ai/en/docs/forms

> **Not this form for bookings**
>
> If visitors should book a free time from your calendar, use [bookings](https://sharepa.ai/en/docs/bookings). A form with times only collects requests.

## Example

```html
<form action="/__sharepa/formular" method="post">
  <input type="hidden" name="_formular" value="Contact">
  <input type="text" name="_honig" tabindex="-1" autocomplete="off"
         aria-hidden="true" style="position:absolute;left:-9999px">

  <input name="name" required placeholder="Your name">
  <input name="email" type="email" required placeholder="Your email">
  <textarea name="message"></textarea>
  <button type="submit">Send</button>
</form>
```

Without JavaScript, the visitor lands on a thank-you page from sharepa after sending.

## Submitting with JavaScript

If the page should stay put, for example for a newsletter field, send in the background and ask for JSON back. `action` and `method` stay on the form so that it also works without JavaScript.

```js
form.addEventListener("submit", async (ev) => {
  ev.preventDefault();
  const r = await fetch("/__sharepa/formular", {
    method: "POST",
    headers: { accept: "application/json" },
    body: new URLSearchParams(new FormData(form)),
  });
  if (r.ok) form.replaceWith("Thanks, you are on the list.");
  else showError((await r.json()).fehler);
});
```

In React, a JSON body works too: `content-type: application/json` with a flat object of text, numbers and lists of text.

## Fields

- Every field needs a `name` in lowercase. The names become the columns of your table.
- A multi-step form is one single form. It is sent once, at the end.
- Fields for passwords, payment or health data are rejected (`formular.heikel`).
- File uploads are discarded.

## Hidden fields

- `_honig` (Text): Trap for bots. Stays invisible and empty for people. If it is filled in, sharepa answers as if it worked and stores nothing.
- `_formular` (Text, up to 60 characters): Name of the form, for example "Sign-up". Helps when a page has several forms.
- `_weiter` (Path): Where to go after sending, on the same page, for example `/#thanks`. Without this field, sharepa's thank-you page appears.

## Limits

| Limit | Free | One-time plan |
|---|--:|--:|
| Entries per page and day | 50 | 500 |
| Entries per account in 30 days | 200 | 5000 |
| Size of an entry | 100 KB | 100 KB |
| Fields per entry | 50 | 50 |
| Characters per field | 10 000 | 10 000 |
| Kept for | 12 months | 12 months |

Forwarding to n8n, Make or Zapier is set up in the app with the one-time plan. Nothing changes in the page code. All error codes are in the [reference](https://sharepa.ai/en/docs/reference/form).

## Related guides

- [Build a form with your chat and collect entries](https://sharepa.ai/en/guides/build-a-form-with-your-chat)
- [A waiting list or newsletter sign-up where the page stays put](https://sharepa.ai/en/guides/waitlist-and-newsletter-signup)
- [Forward form entries to n8n, Make or Zapier (webhook)](https://sharepa.ai/en/guides/form-webhook)
- [Lead Magnet mit KI erstellen: Quiz als Lead Magnet, ohne Code (DE)](https://sharepa.ai/anleitung/lead-magnet-mit-ki)
