How do we get username or email printed in the email notification from logged in user which made form submission?

Permalink
How do we get username printed in the email notification body from logged in user who made form submission?

What I'm trying to achieve; the user who is logged in and submitted the form; I want to include his username in the message body.

Additionally, how do I change form submission email subject line which seems to be hard coded already?

Existing code: block_express_form_submission.php

<?php

defined('C5_EXECUTE') or die("Access Denied.");

$submittedData = '';
foreach ($questionAnswerPairs as $questionAnswerPair) {
$submittedData .= $questionAnswerPair['question']."\r\n".$questionAnswerPair['answerDisplay']."\r\n"."\r\n";
}
$formDisplayUrl = URL::to('/dashboard/reports/forms') . '?qsid='.$questionSetId;

$body = t("
There has been a submission

%s

To view all of this form's submissions, visit %s

",$submittedData, $formDisplayUrl);

 
mohitkapoor2014 replied on at Permalink Reply
Can anyone help with this?
mnakalay replied on at Permalink Reply
mnakalay
In the documentation read this page and look at the part titled "Custom notification"
https://documentation.concrete5.org/developers/express/express-forms...