cakephp3 Adding a button with a link to a javascript function May 27, 2016 admin Leave a comment echo $this->Form->button('new size', ['onclick' => 'myfunction()']); <script> function myfunction(){ //do stuff } </script>