Current page title in a mail template

Permalink
Is it possible to include the current page title in this code?

<?php     
defined('C5_EXECUTE') or die(_("Access Denied."));
$submittedData='';
foreach($questionAnswerPairs as $questionAnswerPair) {
   if ($questionAnswerPair['type'] == 'line') {
      $submittedData .= $questionAnswerPair['question']."\r\n\r\n";
   }elseif ($questionAnswerPair['type'] == 'text') {
      $submittedData .= $questionAnswerPair['question']."\r\n\r\n";
   }elseif ($questionAnswerPair['type'] == 'space' || $questionAnswerPair['type'] == 'hr') {
      $submittedData .= "\r\n";   
   }else{
      $submittedData .= $questionAnswerPair['question'].": ".$questionAnswerPair['answer']."\r\n\r\n";
   }
}  
$formDisplayUrl=BASE_URL.DIR_REL.'/index.php/dashboard/reports/extended_forms/?qsid='.$questionSetId;


(It is the submission-admin.php of the extended form.)

Backstory: I have several identical forms which I want to include in a stack, and use this stack on multiple pages. However, the client wants to know where the form was submitted from. (It is a request a quote/get reservations form). If I were able to include the page title in the notify e-mail, I could use the same form on all the pages, which is definitely better, since the Extended Form block doesn't support the clipboard...

I found out that I have to use $page = Page::getCurrentPage() but not knowing php I have no idea where to insert it (and if it's even possible to work)
Thanks!

 
pvernaglia replied on at Permalink Reply
pvernaglia
Extended form has an option, Capture PageID, just check the box for it and it will include the info in the email
gd42 replied on at Permalink Reply
Can it show the actual page title? Right now it just says in the e-mail Page ID=137

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.