The formaction Attribute

The Current State of HTML5 Forms

<form action="http://example.com">
  <input type=submit value=Submit ↵
     formaction="http://www.wufoo.com">
</form>

Live Demo

Form action set to “http://example.com”

 


Firefox
4+

Safari
5.2+

Safari
5+

Chrome
10+

Opera
10.6+

IE
10+

Android
4.0+

The Low Down

The formaction attribute forces a form to direct to the specified URL instead of the URL specified as the value of the action attribute in the <form> element.

  • Valid for submitting elements, including <input type=submit> and <input type=image> and <button>.
  • Used to override the default form action. Possible use case: “Send to Marketing” / “Send to Support”
  • Not sure exactly when support in Safari began: it didn’t work in Safari 5.0.3 but does now in 5.2. Also fixed from iOS 4 to 5.

Our Cookie Policy and Privacy Policy outline how we use cookies to help optimize service, personalize content, tailor and measure our marketing, and improve your user experience. I agree to use of cookies for these purposes.