Populate Webform hidden field with title of referring node
Drupal 7
I'm having a similar problem to one that's been presented previously but so far I've not been able to make any of the suggestions work.
I have pages of content type named 'Software Products'.  I want to place a link on the pages pointing to a Webform 'Request Information' I want to populate a (hidden) field on the form with the product name which is also the title of the referring product page.
I have tried the following but this just results in the title of the form being shown - not the referring page.

    <?php  
    /** 
    *  Implementation of hook_form_alter(). 
    */  
    function AddNodeInfoToForm_form_alter(&$form, $form_state, $form_id) {  
      switch($form_id) {  
           case 'webform_client_form_10': // the id of the form  
                   {$current_object = menu_get_object(); 
                   $product_title = $current_object->title; 
                   $form['submitted']['product']['#default_value'] = $product_title; }
	           return $form;
	       }
}
I would appreciate any pointers - I'm new to Drupal 
Populate Webform hidden field with title of referring node
===

Drupal 7
I'm having a similar problem to one that's been presented previously but so far I've not been able to make any of the suggestions work.
I have pages of content type named 'Software Products'.  I want to place a link on the pages pointing to a Webform 'Request Information' I want to populate a (hidden) field on the form with the product name which is also the title of the referring product page.
I have tried the following but this just results in the title of the form being shown - not the referring page.

    <?php  
    /** 
    *  Implementation of hook_form_alter(). 
    */  
    function AddNodeInfoToForm_form_alter(&$form, $form_state, $form_id) {  
      switch($form_id) {  
           case 'webform_client_form_10': // the id of the form  
                   {$current_object = menu_get_object(); 
                   $product_title = $current_object->title; 
                   $form['submitted']['product']['#default_value'] = $product_title; }
	           return $form;
	       }
}
I would appreciate any pointers - I'm new to Drupal 