Standard contact form
Permalink
HI
Im using the "Standard contact form" there are in concrete5 and are trying too poll the text from one of the fiels (ex. name:) so it will show i the subject area of the email. when my client get a mail. I know that i need to changes the file controle.php at line (338)but dont know to what. any ideas??
Hope u can help ;)
/Mike
Im using the "Standard contact form" there are in concrete5 and are trying too poll the text from one of the fiels (ex. name:) so it will show i the subject area of the email. when my client get a mail. I know that i need to changes the file controle.php at line (338)but dont know to what. any ideas??
Hope u can help ;)
/Mike
I also have the same question.
You want to look in action_submit_form() in controller.php
just before
Extract the field you want from $questionAnswerPairs - which is a two dimensional array.
Something like:
Then feed $name into the subject line
just before
$mh->setSubject(t('%s Form Submission', $this->surveyName));
Extract the field you want from $questionAnswerPairs - which is a two dimensional array.
Something like:
$name=''; foreach ($questionAnswerPairs as $q){ if ($q['question'] == 'Name'){ $name=$q['answer']; break; } }
Then feed $name into the subject line
Hi jero
Could'n get your code to work, but,u gave me an idea. so i got i WORKING by adding following code in the controller.php right after
add this code:
now it poll's Question25 (wich is my field called "name:") and place it in the subject field in my email...:-)
Could'n get your code to work, but,u gave me an idea. so i got i WORKING by adding following code in the controller.php right after
$mh->load('block_form_submission');
add this code:
$emne = $_POST["Question25"]; $mh->setSubject(t($emne));
now it poll's Question25 (wich is my field called "name:") and place it in the subject field in my email...:-)