How to make select option works like a button? I have created a contact form by using webform module, in that I have added one component as reset and the type is select options.

My requirement is when I choose this reset option from that dropdown and submitted the form, I want to reset my form. I have no idea how can I achieve this. I tried following but not worked, please help me regarding this.

function test_form_alter(&amp;$form, &amp;$form_state, $form_id) {
   if ($form_id == 'webform_client_form_111') {
    $form['submitted']['reset']['#option'] = 'test_reset';
  }
}
function test_reset(&amp;$form, &amp;$form_state){ 
  $form_state['rebuild'] = FALSE;
}
You can write a simple jQuery script for achieving this.

$('select').on('change', function() {     // you can refine this with your field id.
  if( this.value == 'reset' ) {           // Replace value for your 'reset' option.
    $('#yourid').find('form')[0].reset(); // Replace id here
  }
})