[whatwg] WF2: Non-validating submit buttons

Martin Atkins mart at degeneration.co.uk
Wed Jan 24 10:03:58 PST 2007


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.

I propose a flag on the submit button elements (both INPUT and BUTTON 
TYPE="SUBMIT") which causes the browser not to run the usual validation 
procedure before submitting when that button is pressed. For example:

     <input type="submit" validate="no" />

I'm not fussed about the exact name/usage of the attribute, but it seems 
like a common enough case to warrant a declarative solution rather than 
a script one.






More information about the whatwg mailing list