Accepting selected projects for Q2 2024 Check availability →
SERVER 02SYSTEM ONLINELAST SYNC: 03:17:44RSS 2.0 — ONLINE
HALF ASSEDTECHNICAL NOTES_
EST. 1999ISSUE 04.2BEST VIEWED AT 1024 × 768
TECHNICAL NOTES / TECHNICAL NOTES / HTML & FORMS / RECORD ab3fd1
[HTML & FORMS]NOTE

Which HTML form controls are actually submitted?

POSTED: 11.04.2002AUTHOR: ADMIN2 MIN READCOMMENTS: 0

A browser does not submit a copy of every visible control. HTML 4.01 defines a set of successful controls, and the server receives their names and current values. A missing parameter can therefore be normal form behaviour.

Use names for the submitted data

The name attribute supplies the field name in the request. An id associates labels and identifies an element in the document; it does not replace name. An unchecked checkbox is absent, not a value of zero. Only the selected radio button contributes its value. Define how the application represents an absent optional choice instead of treating every omission as a transport failure.

Do not trust disabled or hidden fields

Disabled controls are not submitted. A named read-only text control can be submitted, but read-only status is a browser convenience, not protection against alteration. Hidden values can also be changed by the requester. Recover prices, account ownership and permissions from trusted server data rather than accepting them because the form did not offer an editing box.

Test the payload as well as the page

Use GET for a retrieval such as a search and POST for an operation that changes stored data. Neither choice supplies encryption. Submit the form with each checkbox combination, with no optional choices and by pressing Enter in a text field. Do not depend on receiving one particular submit button’s value in every browser interaction. Check repeated field names according to the server framework’s parsing rules.

SERVER CHECK

Validate the final request independently of the rendered form. Log field presence during testing without recording passwords or complete private messages.

References

W3C: HTML 4.01 successful controls