Adding the current node title as the value of the comment form title? I want a value to be automatically added to the title text-field in the comment form ; this value would be indeed the current node title.

I've started working on a hook_form_alter() (added in a custom module already installed and enabled) like this one :

   function ta_module_form_alter(&amp;$form, &amp;$form_state, $form_id) {
   if ($form_id == 'comment-form') {
        $form['comment']['title']['#value'] = 'Blablabla';
    }
   }


But as you might guess it's not working... I've got several issues:


Is the $form_id the right one ? 
I didn't manage to successfully use print_r($form) (or it returned nothing) so I
guessed the path to the title value. Might be incorrect too...
And finally, I really don't know how to get the current node title
variable, so as to attribute it the title value!


Thanks for reading, I hope I've been understandable !  ;)
You're right, you most likely have the $form_id wrong.  To check this you can use drupal_set_message($form_id); and refresh the page to see all form ids on the current page.  

Once you have the form id correct, then you can use print_r($form);

For example, I got this working on the comment form on my node type "Announcement":

function MYMODULE_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == 'comment_node_announcement_form') {
    $form['subject']['#default_value'] = $form['#node']-&gt;title;
    //print_r($form);
  }
  //drupal_set_message($form_id); // Use to get $form_id
}