The formmethod Attribute
The formmethod Attribute
//the second submit button overrides the HTTP method of the form:
<form action="/action_page.php" method="get">
First name: <input type="text" name="fname"><br>
Last name: <input type="text" name="lname"><br>
<input type="submit" value="Submit">
<input type="submit" formmethod="post" value="Submit using POST">
</form> - Defines the HTTP method for sending form-data to the action URL.
- Overrides the method attribute of the <form> element.
- Can be used with type="submit" and type="image".
Related concepts
→
The formmethod Attribute
Semantic portal