I can, of course, change the type=“cancel” to type=“submit” and check in my .php as you suggest. But thought there might be a detectable way to distinguish between the type=“reset” and the type=“cancel” without invoking (and complicating) the .php module.
The only way you could set up a cancel button would be to either use a submit button and pass a different value to the server saying to cancel OR to use <input type=“button”> with the cancel functionality attached using JavaScript.
You know…there is zero need for a reset button. It is an accident wating to happen. Furthor more, why must the user hit “Cancel” to cancel? Could they just not submit the form and go some where else?
That is a mistake. There are a number of new input types being introduced in HTML 5 and even HTML 5 does not have type=cancel. There is no such thing as type=cancel in any version of HTML. There is no need for it either since the easiest way to cancel a form is to just not press the submit button.
Just to make things easier here’s the complete list
The nearest to a ‘cancel’, would be the ‘cancelable’ value appears within XForms but that’s beyond the scope of HTML. I suspect Jim was thinking of common text rather than “type” and got muddled.