Change contact form subject


I've build a simple contact form using the "form" Add-on. But now when somebody sends a message trough the form the receiver gets an email with
Subject: MyName
SendFrom: MyEmail Address (as defined for the admin)

How I can change this?

Thank you

View Replies: View Best Answer
Agetis replied on at Permalink Best Answer Reply
Wuhu, I figured it out!

After searching for the answer I cam up a post that had some directions so I started experimenting and yeah.

To change the subject, send-email-address and other... you have to edit the block/form/controller.php file in lines from 333 till 348.

Hope this helps someone!
nathangarner replied on at Permalink Reply

I too want to change the subject line of a contact form - currently it says "Contact Form Submission"

In my blocks>form>controller.php file I only have:

defined('C5_EXECUTE') or die("Access Denied.");
class FormBlockController extends Concrete5_Controller_Block_Form {}
class FormBlockStatistics extends Concrete5_Controller_Block_FormStatistics {}
class MiniSurvey extends Concrete5_Controller_Block_FormMinisurvey {}

Is there somewhere else I should be looking?

Agetis replied on at Permalink Reply
Did you try to look at:

/concrete>blocks>form>controller.php ?
this is where the original files are. You should copy the whole form directory to:

and then make the changes there.

If you have updated concrete5 then the files are also in the /updates directory.
nathangarner replied on at Permalink Reply
Hi, Yes that's where I'm looking concrete>blocks>form>controller.php

There's only 5 lines on code in the php file.

There's nothing in the updates folder or the blocks folder in the root.

This seems an amazingly difficult way to change a subject line - would have expected this kind of control to be in system settings or admin.
sschildbach replied on at Permalink Reply
Agetis was answering his question from an older version of C5. Now, 5.6.x has no signs of where editing the Subject line is. Can anyone who has worked with the core of 5.6.x tell us where to go to edit the email subject line the administrator of the site receives? It is so general, that I have actually overlooked the email thinking it was not important, when it was actually a job!
mhawke replied on at Permalink Reply
The built-in Form block is one of the older, less-elegant blocks to deal.

Line 452 of [root]/concrete/core/controllers/blocks/form.php

I'm not exactly sure where you can copy that file so you can safely modify this behavior without losing your changes upon upgrading the core. I'll have to check this out.

ASLO: A lot of the 'core' functions have been moved to the [root]/concrete/core/ folder so you need to dig in there for the actual functions your after.
PatrickCassidy replied on at Permalink Reply
Any luck in finding the way to over-ride this mhawke?

I think it would be good upgrade to a future c5 release if you could specify the subject in the actual form block when editing the site.
craftsman841 replied on at Permalink Reply
I have the same problem. This is all I see too. There's nothing in updates either. Where else should we look?