HTML <input> formactionAttribute
Examples
An HTML form with two submit buttons (with different action values):
<form action="demo-form.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="demo-admin.php" value="Submit">
</form>
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="demo-admin.php" value="Submit">
</form>
Try it Yourself »
Browser Support
![]()
![]()
![]()
![]()
![]()
Internet Explorer 10, Firefox, Opera, Chrome, and Safari all support the formaction attribute.
Note:Internet Explorer 9 and earlier versions do not support the formaction attribute of the <input> tag.
Definition and Usage
The formaction attribute specifies the URL of the file that processes the input control when the form is submitted.
The formaction attribute overrides the <form> element'sactionattribute.
Note:The formaction attribute applies to type="submit" and type="image".
Differences between HTML 4.01 and HTML5
The formaction attribute is a new attribute in HTML5.
Syntax
<input formaction="URL">
Attribute Values
| Value | Description |
|---|---|
| URL | Specifies the URL of the file that processes the input control when the form is submitted. Possible values:
|
HTML <input> Tag Other Extensions