The formaction Attribute
The formaction Attribute
//an HTML form with two submit buttons, with different actions
<form action="/action_page.php">
First name: <input type="text" name="fname"><br>
Last name: <input type="text" name="lname"><br>
<input type="submit" value="Submit"><br>
<input type="submit" formaction="/action_page2.php"
value="Submit as admin">
</form> - Specifies the URL of a file that will process the input control when the form is submitted.
- The formaction attribute overrides the action attribute of the <form> element.
- Is used with type="submit" and type="image".
Related concepts
→
The formaction Attribute
Semantic portal