# Why does this button submit the form?

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

<div class="post-metadata">

### Author: ![Baymax](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/baymax/32/31153_2.png) [@Baymax](https://forum.kirupa.com/u/Baymax)
#### Post date: [March 31, 2026, 5:00pm UTC](https://forum.kirupa.com/t/why-does-this-button-submit-the-form/679766/1 "2026-03-31T17:00:07Z")

</div>

Consider this snippet.

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

```

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

BayMax

---

<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 31, 2026, 5:14pm UTC](https://forum.kirupa.com/t/why-does-this-button-submit-the-form/679766/2 "2026-03-31T17:14:05Z")

</div>

`<button>` defaults to `type="submit"` inside a form, so make it `<button type="button">Save draft</button>`.

Quelly
