December 6, 2018, 9:41am
I need a Cancel Button which does call my controller.
I want to have client validation in my form, but I also want a “Cancel Button”.
I havent found any option/parameter for html::a or html::submitButton to switch off validation on just that button.
I am aware of "‘enableClientValidation’=>false, " which does disable clientvalidation for whole form, which I wont want.
Any help appreciated
December 6, 2018, 1:54pm
Why do you need to disable client validation in this situation ? As far as I know client validation is fired only when input element lost focus. When you click on the button, unless it is submit button, no validation should be ran.
September 27, 2021, 3:23am
Hi!, I am having the same issue. Were you able to solve this?
September 27, 2021, 5:35am
I do something like the following
In my view
'class' => 'btn btn-warning ',
'accesskey' => 'c',
In the Controller
public function actionCancel($id)
* special id handling ...