Capture a visitor's choices
A form element is a controlling wrapper for submitting user choices to the web server.
Choices are gathered from the values provided through subordinate input elements. The entire assembly of user choices are classically submitted to the server using an HTTP POST method with a payload having a content type of
- Use sourceref notation to specify the URI of an endpoint on the server that will process the form's submission.
- The HTTP method to use when submitting the form:
POSTForm data are included in the payload. (This is the default.)
GETForm data are included as query-string variables.
dialogThis is used to close a dialog box when the form is inside a dialog element.
- The content-type of the payload being submitted:
application/x-www-form-urlencodedValues are encoded as keyword/value pairs, where the keywords come from the input elements' name attribute.
multipart/form-dataA special type used when uploading files to the server.
text/plainSpaces are converted to the PLUS SIGN, but everything else remains unencoded.
onThe browser can assist the user by automatically providing values that were previously used on similar forms.
offThe browser should not provide any automatic assistance.
- When present, this indicates that the browser should not validate the input prior to submitting it.
- The browsing context to be used when the server has finished processing the submission and returned control to the browser:
iframenameThe response should be displayed in the named iframe.
_selfUse the same window that the form was on.
_blankUse a new browser window.
_parentUse the parent of the form's frameset (valid only when the form is nested within a frameset).
_topUse the topmost parent of the frameset (valid only when the form is doubly nested within a frameset).