How to add reset button to forms? I've been researching this matter for a while with no clear answer yet.
So, here are a few questions ...

I'm assuming (correct me if I'm wrong) that Drupal 7 doesn't support reset buttons. It appears, according to the form API (as discussed in Pro Drupal 7 Development), that all the buttons (input type=&quot;submit&quot;, button, and image_button) are by default submit buttons. There doesn't appear to be a way to override the defaults either.
So, if I wanted to add functionality to my forms for my users to clear forms (if they choose), would I have to create a module?

Would I be able to pull this off by using the general button type with executes_submit_callback set to false and by adding some type of Ajax function to the mousedown event?


** EDIT: I added the following to my hook_form_alter() **
$form['reset'] = array(
'#input' =&gt; TRUE,
'#name' =&gt; 'reset',
'#button_type' =&gt; 'reset',
'#executes_submit_callback' =&gt; FALSE,
'#limit_validation_errors' =&gt; TRUE,
'#process' =&gt; '',
'#theme_wrappers' =&gt; array('button'),
);

I got the following error message &amp; warning:

Notice: Undefined index: #type in _form_builder_handle_input_element() (line 1949 of /var/www/vhosts/lae/drupal-7.11/includes/form.inc).
Warning: Invalid argument supplied for foreach() in form_builder() (line 1763 of /var/www/vhosts/lae/drupal-7.11/includes/form.inc).

Is there a way to add the &quot;reset&quot; button type to the types of buttons without crashing the entire form.inc?
My preferred way to do this is.

Add the button to your form like so:

$form['options']['reset'] = array(
  '#type' =&gt; 'submit',
  '#value' =&gt; t('Reset'),
  '#submit' =&gt; array('MY_MODULE_FORM_ID_reset'),
);


Then create the reset function like so:

function MY_MODULE_FORM_ID_reset($form, &amp;$form_state) {
  $form_state['rebuild'] = FALSE;
}


No Javascript, no markup.