How to display a customized button on a single form only? I have created a reset button by adding a customized module (Reset) for webform. But this button gets displayed all over the site. I just want to display this button on a single webform. 

Below is my Reset module code:

&lt;?php
/*
 *
 *  creating  hook_form_alter()
 *
 */
function custom_example_form_alter(&amp;$form,&amp;$form_state,$form_id) {
            $form['webform_client_form_34'] = array(
            '#weight' =&gt; 1001,    
            '#markup' =&gt;'&lt;input class="form-button" type="reset" value="Reset"/&gt;',
            );
            return $form;
}


How should the if condition look like that I should be adding to it ?
Find the form id first.

Assume your form id is 50 than,

function &lt;module&gt;_form_alter(&amp;$form, $form_state, $form_id) {
  if (strpos($form_id, 'webform_client_form_50') === 0) {
    $form['actions']['reset'] = array(
      '#type' =&gt; 'button',
      '#value' =&gt; t('Reset'),
      '#weight' =&gt; 100,
      '#validate' =&gt; array(),
      '#attributes' =&gt; array('onclick' =&gt; 'this.form.reset(); return false;'),
    );
  }
}


OR

 if ($form_id == 'my_webform_client_form_id') {

Your code

}




Another method :- 

In Drupal 7, you can either use hook_form_alter() or hook_form__alter(), which ever you prefer. Just make sure you get the naming and parameters right. Drupal 6 only supports hook_form_alter() however.

When you create these functions, also remember that Drupal may not always pick up on them until you've flushed the cache.

function mymodule_form_webform_client_form_44_alter(&amp;$form, &amp;$form_state) {
// code here;
}


Please remember to clear your cache also and try to disable/enable your module also