What gets submitted
What does a checkbox send when the form is submitted?
A checked checkbox sends its name and value; an unchecked one sends nothing, so the key is missing rather than false. Boxes that share a name each add their own pair, and a disabled box is skipped even when it is checked.
| Checkbox state | What the browser sends | Notes |
|---|---|---|
Checked, with value="yes" | agree=yes | The value is sent exactly as written. |
Checked, no value attribute | agree=on | on is the default value, so always set a meaningful one. |
| Unchecked | Nothing: the agree key is absent | No agree= and no false. Treat a missing key as unchecked. |
Several checked boxes with the same name | interest=beta&interest=demo | One pair per checked box, in page order. Object.fromEntries(new FormData(form)) keeps only the last; read them all with formData.getAll("interest"). |
disabled (checked or not) | Nothing | Disabled controls are skipped. To send a fixed value, use a hidden input instead. |
indeterminate set in JavaScript | Whatever its checked state says | Indeterminate only changes how the box looks. It is not an HTML attribute and is never submitted. |
No name attribute | Nothing | Only named controls are submitted; id does not count. |
These are the checkbox rows only. The other input types are listed with their submitted values in the input types table.
Sources: WHATWG HTML Standard: constructing the entry list · WHATWG HTML Standard: checkbox state · WHATWG HTML Standard: indeterminate · MDN: checkbox value · MDN: FormData.getAll()




