W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2007

[whatwg] WF2: Non-validating submit buttons

From: Thomas Broyer <t.broyer@gmail.com>
Date: Wed, 24 Jan 2007 20:20:50 +0100
Message-ID: <a9699fd20701241120i7d145f06o7cb245f9fd2dca9@mail.gmail.com>
2007/1/24, Martin Atkins:
>
> It would be useful to be able to mark certain submit buttons as
> non-validating.
>
> Use case: lots of the forms generated by one of my web-apps have a
> "Cancel" button which simply causes the server to redirect the user back
> to wherever they came from. When I use the WF2 extensions to mark
> required fields, formats, etc the Cancel button won't submit until the
> form is completed correctly. This doesn't make much sense from a UI
> perspective.

Cannot you accomplish that by using two forms?

<form id="cancel" action="/cgi-bin/script" method="post"></form>
<form action="/cgi-bin/script" method="post">
    <p>Name : <input name="name" required></p>
    <p><input type="submit" name="ok" value="Save">
      <input type="submit" name="cancel" value="Cancel" form="cancel"></p>
</form>

-- 
Thomas Broyer
Received on Wednesday, 24 January 2007 11:20:50 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:31 UTC