New in HTML5.

<input formaction="">

Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
Attribute of
How To Use Input To Create Form Fields In HTML: Easy Tutorial
What does <input formaction=""> do?
Specifies the URL for form submission. Can only be used for type="submit" and type="image".

Code Example

<form>
 <label for="name">Name</label><br>
 <input name="name"><br>
 <input type="submit" formaction="/input-formaction" value="Submit">
</form> 


What is the point?

The <form> element has an action attribute which specifies the URL for form submission. The new formaction attribute for the <input> element accomplishes the same thing. Why would you want that? Since the formaction attribute is attached to the submission button, you could use it with multiple buttons to specify several different form submission URLs.

Adam is a technical writer who specializes in developer documentation and tutorials.

Browser Support for formaction

iefirefoxchromeedgesafariopera
10434513934