This is the documentation for concrete5 version 5.6 and earlier. View Current Documentation

I thought it would be nice to make an email form on a C5 site and allow people to include a "reply to" or "from" address. Currently, C5 only has the option to include the owner of the page in the "from" portion of the emailed form. This gets really annoying if you use the form for questions and feedback because you have to copy+paste the email address into a new email and reply that way.

I wrote a simple fix on the PHP page SITE/concrete/blocks/form/controller.php

Just make the change below (simply search for one of the lines to find the right place, somewhere in the lines 300 to 350 territory, and you can figure out the rest):

}elseif($row['inputType']=='email'){
   $answerLong="";
   $answer=$txt->sanitize($_POST['Question'.$row['msqID']]);
   //  New line below.
   $fromEmail=$answer;

and this change:

$mh->to( $this->recipientEmail );
//  $mh->from( $formFormEmailAddress );  is the old line
$mh->from( $fromEmail );  //  is the new line

This makes the "email" field of a form into the "from" or "reply to" field when it arrives in your inbox. It would be nice if this were added to C5 permanently, but it's a really easy fix even if they don't.

Loading Conversation