Sunday, October 11, 2009

What information is submitted in HTML form

Some of the information I discovered during working on a project, other stuff from Google and from: http://www.w3schools.com/html/html_forms.asp
It might seems obvious, but it caused me a lot of trouble.
There are 3 simple rules:
1. For POST method - If there are no files the Content Type is "application/x-www-form-urlencoded" otherwise it is "multipart/form-data"
2. It takes the "value" attribute of: "input", "select", "textarea"
3. It an element has "disabled" attribute it must be "false", and if it has "checked" attribute it must be "true"
More details:
1. For "input" it does not submit the value of elements with "type" equals to "submit" or "reset"
2. "button" elements are also submitted, but see the notes here: http://www.w3schools.com/tags/tag_button.asp

No comments:

Post a Comment