YouTip LogoYouTip

Att Input Formaction

# HTML formaction Attribute The `formaction` attribute is a powerful HTML5 feature that allows developers to override the default submission URL of a form on a per-button basis. This tutorial provides a comprehensive guide to understanding, implementing, and leveraging the `formaction` attribute in your web projects. --- ## Introduction By default, when a user submits an HTML form, the browser sends the form data to the URL specified in the `
` element's `action` attribute. However, there are many scenarios where you might want to submit the same form data to different destinations depending on which button the user clicks (for example, "Save Draft" vs. "Publish", or "Standard Submit" vs. "Admin Submit"). The `formaction` attribute solves this by allowing you to specify an alternative submission URL directly on the submit button. ### Key Features: * **Overrides the Form Action:** The `formaction` attribute on an `` element overrides the `action` attribute of its parent `` element. * **Applicable Elements:** It can only be used on `` elements where the `type` attribute is set to `"submit"` or `"image"`. It can also be used on `
← Att Input FormenctypeAtt Input Form β†’