- Attribute of
- <input> HTML Tag
- What does
- Specifies the URL for form submission. Can only be used for type="submit" and type="image".
<form> <label for="name">Name</label><br> <input name="name"><br> <input type="submit" formaction="/input-formaction" value="Submit"> </form>
What is the point?
<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.
Browser Support for formaction