I am using zf2 framework. So that i need to implement something like,
i have tried to find it by search it on internet but i could not find any tutorials about this problem.
Thanks
Try this.
$element = new Element\Radio('name');
$element->setAttribute('onClick', 'if(this.checked){myFunction()}');