Hi there,

Is there any way to reformat the subject and body of the message sent by feedback?

The thing is these messages are going to be sent to the client, and I don't want to bomb their mailboxes with (a) Subject bars that don't describe anything about the message and (b) Email messages that are not easy to read, have superfluous information on them and don't read in plain english.

At the moment the message comes through more like an extract from a database (or an automated report) than an emglish message written from a person to a person...

In short I need to override, replace or hook the feedback_mail_form_submit function, so I can reformat the body and subject.

I have tried overriding this and that on the form, but all to no avail. I don't really want to write (another!) module just to use form_alter, I'd like to be able to acheive this with theme functions...

Surely the most graceful solution is to move the subject and body creation parts of feedback_mail_form_submit to theme functions, but I'm not about to write a patch and make work for myself if theres already a way to do this...

I suppose this could turn into a feature request if theres no obvious way so far...

For example, this line in feedback_mail_form_submit creates the subject bar :

$subject = $page->subject_prefix . $category . $edit['subject'];

but it would be better to use this:

$subject = theme('subject_field', $page, $edit);

and then a new function (that can be over-written in the theme system) :

 function feedback_subject_field($page, $edit) {
  return $page->subject_prefix . ( $page->field_category ? ' ['.$edit['category'].'] ' : ' ' ) . $edit['subject'];
}

But anyway, whatever help would be grand....

ZuluWarrior

Comments

sun’s picture

Status: Active » Closed (won't fix)

Development on Feedback module v1.x has ended. Beginning from 2.x, the Feedback module has been replaced with a completely different module with a different purpose. Please note that Feedback 2.x is not compatible with 1.x. See #279636: Turn Feedback into user feedback module for further information.

There will be a final 5.x-1.1 release with all existing and tested patches in the issue queue applied. If you need the functionality of the Feedback 1.x module, the Contact module in Drupal core as well as the contributed Webform module are recommended replacements. However, there is no migration path to those modules.

Marking as won't fix.