This is how to make the reply to email work with the contact form block
Permalink 1 user found helpful
Writing this because I spent way to much time trying to figure this out and wanted to help someone else. There seems to be a many posts about this but no good answer, so here's the answer:
modify concrete>Blocks>form>controller.php
change line 333 to this:
$mh->from( $questionAnswerPairs[2]['answer'] );
the number [2] refers to the database record with for field name msqID
This should be [2] on a new contact form with the [1] being 'Your Name', You may have to change that number depending on how many questions you have created before that one. Do a search in phpmyadmin for the name of your question(the form question, like (Your E-mail)) if you don't know.
To future proof it, copy that controller.php file to blocks>form>controller.php and modify it there only.
modify concrete>Blocks>form>controller.php
change line 333 to this:
$mh->from( $questionAnswerPairs[2]['answer'] );
the number [2] refers to the database record with for field name msqID
This should be [2] on a new contact form with the [1] being 'Your Name', You may have to change that number depending on how many questions you have created before that one. Do a search in phpmyadmin for the name of your question(the form question, like (Your E-mail)) if you don't know.
To future proof it, copy that controller.php file to blocks>form>controller.php and modify it there only.
Thought this was great as it worked in putting in the from email. However, moving the file as suggested removed the form formatting i.e. highlighted message, url check, etc. Tried several variations with same result.
I see now, this was before the 5.4.2. update where the file appears to have been rewritten. Yikes! Just when you think you have something fixed it's not!
and now with 5.5 it changed again. Why can't this just be added as an option when making the form?