Hi,
This might be of general interest?
diff --git a/sites/all/modules/anonymous_contact/anonymous_contact.module b/sites/all/modules/anonymou
index d4af64a..f7f2e60 100644
--- a/sites/all/modules/anonymous_contact/anonymous_contact.module
+++ b/sites/all/modules/anonymous_contact/anonymous_contact.module
@@ -73,6 +73,8 @@ function anonymous_contact_form(&$form_state, $recipient) {
'#title' => t('Subject'),
'#maxlength' => 50,
'#required' => TRUE,
+ //SB: hack to pass subject as an argument
+ '#default_value' => isset($_REQUEST['subject']) ? check_plain($_REQUEST['subject']) : '',
);
$form['message'] = array('#type' => 'textarea',
'#title' => t('Message'),
@@ -81,6 +83,8 @@ function anonymous_contact_form(&$form_state, $recipient) {
);
$form['copy'] = array('#type' => 'checkbox',
'#title' => t('Send yourself a copy.'),
+ // SB: default: yes
+ '#default_value' => 1,
);
$form['submit'] = array('#type' => 'submit',
'#value' => t('Send e-mail'),
@@ -115,6 +119,10 @@ function anonymous_contact_form_submit($form, &$form_state) {
$values['account'] = $account;
$values['user'] = $fake_user;
+ // SB: add user details to the message
+ $values['message'] .= "\n\n\n" . '---' . "\n"
+ . 'From ' . $values['name'] . '(' . check_plain($values['from']) .')';
+
// Send the e-mail in the requested user language.
drupal_mail('anonymous_contact', 'user_mail', $to, user_preferred_language($account), $values, $fro