title: Codeigniter change form action by clicking buttons
body: <p>I have 2 submit buttons in my form and I'm trying to make each one go to a different controller method. I'm trying not avoid the use of multiple forms.</p>
  
  <p>I'm currently using</p>
  
  <pre><code>&lt;button type="submit" onclick="javascript: form.action='restore'"&gt;Restore&lt;/button&gt;
  &lt;button type="submit" onclick="javascript: form.action='delete'"&gt;Delete&lt;/button&gt;
  </code></pre>
  
  <p>...which works but I'm not sure if that's the best method. Any thoughts?</p>