title: Populate Webform hidden field with title of referring node
body: <p>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 'Product' pages of content type 'Software Products'.  I want to place a link on the product 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.</p>
  
  <pre><code>&lt;?php  
  /** 
  *  Implementation of hook_form_alter(). 
  */  
  function AddNodeInfoToForm_form_alter(&amp;$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-&gt;title; 
                 $form['submitted']['product']['#default_value'] = $product_title; }
             return $form;
         }
  </code></pre>
  
  <p>}
  I would appreciate any pointers - I'm new to Drupal </p>