Form Fields as Submitted Name-Value Pairs

A form submission serializes participating controls under form rules. The server receives values and assigns them types and domain meanings.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace a submitted count
  2. Check omitted controls
  3. Inspect what successful controls actually submit
  4. Test important missing and empty distinctions

Trace a submitted count

A control named quantity can send text showing seven. The receiving handler converts it to an integer and applies a valid range. See typed input records for that boundary.

Check omitted controls

Some controls may contribute no submitted value in a particular state. A default may then apply, or the field may be required according to the web contract. Absent and empty input guides tests for the two cases.[1][2]

Inspect what successful controls actually submit

A form can provide a named search input and two checkboxes sharing the name tag. If both are selected, the request can carry two tag values. Unchecked checkboxes and disabled controls typically do not submit their values. See repeated names in web inputs.

q=rail
tag=history
tag=maps
An unselected checkbox need not appear as tag=false

Test important missing and empty distinctions

An editable text field may submit an empty value while an omitted control contributes no pair. The server must interpret those cases intentionally. Include keyboard submission and inspect the actual resulting parameter data.

References

  1. IETF, RFC 9110: HTTP Semantics ↩
  2. WHATWG, HTML Living Standard: Forms ↩