I'd like to put a cancel button on a form rather than rely on people using the back button. I've added a FormAction and coded the function so it just does redirectBack().
My problem is that my form's validation is kicking in before the cancel function code is fired. Because the form has required fields, the validation fails, and instead of returning where they came from, the form is displayed again with errors highlighted.
I've checked the contents of $data in my validator class, but it doesn't have anything which indicates the button pressed, so I can't return without validating.
How can I add my cancel button? Is there some other FormAction that I've overlooked, or some other way of not running the validation?