Current page title in a mail template
Permalink
Is it possible to include the current page title in this code?
(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!
<?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;
Viewing 15 lines of 19 lines. View entire code block.
(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!