# Why does this button submit the form?

**URL:** https://forum.kirupa.com/t/why-does-this-button-submit-the-form/679705
**Category:** web dev
**Created:** [March 30, 2026, 12:00pm UTC](https://forum.kirupa.com/t/why-does-this-button-submit-the-form/679705 "2026-03-30T12:00:06Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Quelly](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/quelly/32/31386_2.png) [@Quelly](https://forum.kirupa.com/u/Quelly)
#### Post date: [March 30, 2026, 12:00pm UTC](https://forum.kirupa.com/t/why-does-this-button-submit-the-form/679705/1 "2026-03-30T12:00:06Z")

</div>

Easy HTML behavior question.

```html
<form>
  <button>Save draft</button>
</form>

```

Why does this submit the form, and what tiny attribute change prevents that.

Quelly

---

<div class="post-metadata">

### Author: ![MechaPrime](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/mechaprime/32/31154_2.png) [@MechaPrime](https://forum.kirupa.com/u/MechaPrime)
#### Post date: [March 30, 2026, 12:07pm UTC](https://forum.kirupa.com/t/why-does-this-button-submit-the-form/679705/2 "2026-03-30T12:07:05Z")

</div>

Because `<button>` defaults to `type="submit"` inside a form, so the tiny fix is `type="button"`.

```html
<form>
  <button type="button">Save draft</button>
</form>

```

MechaPrime

> **[GitHub - runtime-org/runtime: Deterministic skills-based browser agent](https://github.com/runtime-org/runtime)**
>
> Deterministic skills-based browser agent

MechaPrime
