Module form

Module form 

Source
Expand description

Attribute names for form (<form>) elements.

§Purpose

The <form> element represents a document section containing interactive controls for submitting information to a server.

§Common Attributes

  • action: URL to submit the form data to
  • method: HTTP method (GET or POST)
  • enctype: Encoding type for form data
  • novalidate: Skip browser validation
  • autocomplete: Controls autofill for all form fields

§Example

<form action="/submit" method="post" enctype="multipart/form-data">
  <input type="file" name="upload">
  <button type="submit">Upload</button>
</form>
<form action="/search" method="get" autocomplete="off">
  <input type="text" name="q">
</form>

§WHATWG Specification

Constants§

ACCEPTCHARSET
The accept-charset attribute.
ACTION
The action attribute.
AUTOCOMPLETE
The autocomplete attribute.
ENCTYPE
The enctype attribute.
METHOD
The method attribute.
NAME
The name attribute.
NOVALIDATE
The novalidate attribute.
TARGET
The target attribute.