[whatwg] WF2: Non-validating submit buttons

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