• Join Now
  • Sign In
  • Cart
  • Instant Setup
  • Download
Logo
  • About
    • For Developers
    • For Agencies
    • For Designers
    • For Anyone
    • Testimonials
    • Showcase
    • Our Philosophy
    • Blog
    • Instant Setup
  • Community
    • Members
    • Forums
    • Chat
    • Karma
    • International
    • Jobs
    • eNewsletters
  • Developers
    • Download concrete5
    • Join Beta Team
    • Translate concrete5
    • Bug Tracker
    • Submit to Marketplace
    • Code Submissions
    • News
    • Community Leaders
    • Related Projects
  • Marketplace
    • Add-Ons
    • Themes
    • Hosting
    • Training
    • Add-on Installation
    • Deal Of The Day
    • Swag
  • Enterprise
  • Documentation
    • Getting Started
    • Editor's Guide
    • Learn concrete5
    • Developers Index
    • How-Tos
  • How-Tos

Add ability in contact form to reply to the submitter

Posted bycurtis07 in Developers on Feb 23, 2012. Originally found at www.concrete5.org.
20 people like this.

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.

How-To Tags

form, email form, contact form, from, mail form, reply to

Related How-Tos

None.

  • Documentation
  • How-Tos
  • Developers
  • Add ability in contact form to reply to the submitter

Do you have questions

  • What are users saying?
  • Who is using concrete5?
  • What makes concrete5 easy?
  • Why develop on concrete5?
 

We’re on “The Twitter”

RT @concrete5: Check out the new lower prices on 3 of the #concrete5 Core Team add-ons. And 2 more are now Free. http://t.co/suCKapEfQd

Follow concrete5

About

  • For Developers
  • For Agencies
  • For Designers
  • For Anyone
  • Testimonials
  • Showcase
  • Our Philosophy
  • Blog
  • Instant Setup

Community

  • Members
  • Forums
  • Chat
  • International
  • Jobs
  • eNewsletters

Developers

  • Download concrete5
  • Join Beta Team
  • Translate concrete5
  • Bug Tracker
  • Beta
  • Submit to Marketplace
  • Code Submissions
  • News
  • Community Leaders
  • User Doc Group
  • Related Projects

Marketplace

  • Add-Ons
  • Themes
  • Hosting
  • Training
  • Add-on Installation
  • Deal Of The Day
  • Swag

Documentation

  • Getting Started
  • Editor's Guide
  • Learn concrete5
  • Developers Index
  • How-Tos

Legal

  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Contact Us
© 2008 to 2013 Concrete CMS Inc. All Rights Reserved.

Sign In?

You must have a user account and be signed to perform this action.

  • Sign In
  • Register