# Spot the bug - #193: Submit Form

**URL:** <https://forum.kirupa.com/t/spot-the-bug-193-submit-form/684089>\
**Category:** web dev\
**Created:** [November 18, 2026, 4:05pm UTC](https://forum.kirupa.com/t/spot-the-bug-193-submit-form/684089 "2026-11-18T16:05:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ellen1979](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ellen1979/32/31260_2.png) [@Ellen1979](https://forum.kirupa.com/u/Ellen1979)\
**Post date:** [November 18, 2026, 4:05pm UTC](https://forum.kirupa.com/t/spot-the-bug-193-submit-form/684089/1 "2026-11-18T16:05:18Z")

</div>

Tiny form puzzle with a quirky twist.

```html
<form id="quiz-form">
  <label for="name">Name:</label>
  <input id="name" name="name" required>
  <button type="submit">Submit</button>
</form>
<script>
  const form = document.getElementById('quiz-form');
  form.addEventListener('submit', (e) => {
    e.preventDefault();
    const data = new FormData(form);
    // Deliberate bug: using get on FormData returns first value only when used as an object
    const name = data.getAll('name')[0];
    alert('Hello, ' + name);
  });
</script>

```

Reply with what is broken and how you would fix it.
