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

# HTML Field Types

> Understand how different HTML inputs map to Formbase submission data.

Formbase stores submissions as a JSON object where each key is the `name` attribute of a field. Most HTML inputs work exactly as you expect, but some types (checkbox groups and multiple inputs) have special considerations.

Use this reference to pick field names and understand what shows up in your submission data.

<AccordionGroup>
  <Accordion icon="text" title="Text, email, number, and textarea">
    ```html theme={null}
    <input name="full_name" type="text" />
    <input name="email" type="email" />
    <input name="age" type="number" />
    <textarea name="message"></textarea>
    ```

    Each field becomes a string value in the submission data.
  </Accordion>

  <Accordion icon="dot-circle" title="Radio buttons">
    ```html theme={null}
    <label><input type="radio" name="plan" value="basic" /> Basic</label>
    <label><input type="radio" name="plan" value="pro" /> Pro</label>
    ```

    Only the selected value is submitted. The key is `plan` and the value is the chosen option.
  </Accordion>

  <Accordion icon="check" title="Checkboxes">
    ```html theme={null}
    <label><input type="checkbox" name="newsletter" value="yes" /> Subscribe</label>
    ```

    If checked, the value is sent. If unchecked, the key is omitted entirely.
  </Accordion>

  <Accordion icon="list" title="Select menus">
    ```html theme={null}
    <select name="country">
      <option value="us">United States</option>
      <option value="ca">Canada</option>
    </select>
    ```

    The selected option value is stored under `country`.
  </Accordion>

  <Accordion icon="paperclip" title="File inputs">
    ```html theme={null}
    <input name="resume" type="file" />
    ```

    Files are uploaded and stored as URLs. Formbase sets either the `file` or `image` key based on the MIME type.
  </Accordion>
</AccordionGroup>

## Multiple values with the same name

When using `multipart/form-data`, repeated keys collapse to the last value. If you need arrays (for example, multi-select or checkbox groups), submit as JSON instead.

```js theme={null}
await fetch('https://formbase.dev/s/YOUR_FORM_ID', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ tags: ['design', 'growth', 'product'] }),
});
```

<Callout type="note">
  JSON submissions are best when you need structured data or arrays. Browser form posts are best for simple, classic form flows.
</Callout>
