SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Nov 2006
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Slight modification Drupal Contact Module output

    I'm using the contact form module, but would like to alter the email output it generates by default.

    For one, in the 'From' field it shows just the email address. So when I reply it says:

    "person@mail.com wrote on 08-08-12"

    Instead I would like the From field to show the name of the sender (linked to his/her email address off course so I can reply to it). As a result, when I reply it would say for example:

    "John Doe wrote on 08-08-12"

    Second, the email sent starts with:

    "John (person@email.com) sent a message using the contact form
    at www.mysite.com/contact"

    How can I edit that default line? Or perhaps leave it out all together?

    I've read you shouldn't edit the core module code. What do I have to do to make these two slight moficiations?

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,033
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    I don't know if it will give you all the flexibility you're looking for but I would use the webform module, disable Drupal's contact form and replace it with your own custom webform. You'll get a lot more flexibility on how you receive the results.

    http://drupal.org/project/webform/
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development

  3. #3
    SitePoint Zealot
    Join Date
    Nov 2006
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tried that and although I like it and it is much more flexible there's one thing I don't like: it saves all email submissions in a Results table. For each email sent I really have no need for that, but there isn't an option to turn it off either. That submission results list contains no big files and it isn't a big problem since only I as admin can view it, but with each email sent that list will grow off course. Taking up more site space. So I have to periodically clear that list. There's nothing to do about that?

  4. #4
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,033
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Well, each submission is in the database and I expect unless you get tens of thousands of them, you won't need to worry about them. One of the chief reasons I use the webform module is so that I have the records.

    If it really is a big issue, there's a discussion about it here and at around post #90 there are some good leads: http://drupal.org/node/290448

    Here's a temp module to prevent results from being stored based on the discussion: http://drupal.org/sandbox/jrockowitz/1439194
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •