Reputation: 196459
if you set "disabled" on a input and submit a form, that field doesn't seem to be in the Request.Form when you post to the server.
What is the logic behind the design decision to not post this field solely based on some presentation layer decision?
This makes no sense to me . ..
Upvotes: 2
Views: 2004
Reputation: 449395
Works as specified by the W3C (albeit a bit cryptical):
Disabled controls cannot be successful. [...]
A successful control is "valid" for submission
If you want to make an element unaccessible for the user, while sending along the value, use the readonly
property.
Upvotes: 5