What I would love is that the subject/title of the node is being transferred to the contact form when you click the contact author button.

I am just beginning to develop with drupal so i you are not implementing this, may bey you can point me in the right direction to try to do it myself.

greets,

K.

Comments

WillGFP’s picture

I'm working on this as well. Someone else recommended the Prepopulate module, which I'm currently testing out now.

ressa’s picture

I use the below in a Display Suite code field to make a link to the node author's contact form, with the Subject field pre-populated with the node title, and link in the Message field:

  $node = menu_get_object();
  print l(t('Contact author'), 'user/' . $node->uid . '/contact', array(
    'query' => array(
      'edit[subject]' => $node->title,
      'edit[message]' => 'Contacting author of this node: http://' . $_SERVER['HTTP_HOST'] . request_uri(),
    ),
  ));

NOTE: for some reason the message line is wrongly formatted by the system, this is the actual line:
'edit[message]' => 'Contacting author of this node: http://' . $_SERVER['HTTP_HOST'] . request_uri(),