title: CakePHP onClick for form->end
body: <p>I would like to include a javascript function for preventing user from submiting form twice, but I just cannot call the function on submit click. Here is what I have tried:</p>
  
  <pre><code>&lt;?php echo $this-&gt;Form-&gt;end(__('Save'), array('onclick'=&gt;'submit();'));?&gt;
  </code></pre>
  
  <p>I went through the documentation and it seems that the Form->end does not take such parameters, which is really odd. Can that be true?</p>
  
  <p>Any information or help is much appreciated</p>