Hi Bob
I'm using the same form on about 90 different pages on my site, but I will need to know from which page the form was sent.
Is there a way to add a hidden field that submits the URL, or Page Title, with the form info when the form is sent?
Kind regards
Matt
I'm using the same form on about 90 different pages on my site, but I will need to know from which page the form was sent.
Is there a way to add a hidden field that submits the URL, or Page Title, with the form info when the form is sent?
Kind regards
Matt
Hi Bob
Well I've tried evetyhing on that page and nothing actually gets through... I get the Form Sublission by email, and I get the field saying Custom Code: but there's nothing in the Table Cell next to it. I have tried all of the code in that FAQ seperately and altogether, I have tried PURE code on and off, I have tried wrapping it in various tags... and nothing seems to work - always I just get an empty table cell.
Any thoughts?
KR
Well I've tried evetyhing on that page and nothing actually gets through... I get the Form Sublission by email, and I get the field saying Custom Code: but there's nothing in the Table Cell next to it. I have tried all of the code in that FAQ seperately and altogether, I have tried PURE code on and off, I have tried wrapping it in various tags... and nothing seems to work - always I just get an empty table cell.
Any thoughts?
KR
Hi Matt,
Please drag a Debugger action into the On Submit event, then submit the form and post the debug - including the 'dummy emails' results here.
Note: if you are using the Easy Wizard you can turn on Debug on the Others tab in CFv4 or the Setup tab in CFv5.
Bob
Please drag a Debugger action into the On Submit event, then submit the form and post the debug - including the 'dummy emails' results here.
Note: if you are using the Easy Wizard you can turn on Debug on the Others tab in CFv4 or the Setup tab in CFv5.
Bob
Hi Bob
OK I don;t know if you wanted all of the debug info or just the bit we're looking at, so here is just the bit we're looking at. Note that I have used the code examples you gave in your FAQ page, and have pasted the results by the number of your example of the FAQ page at http://www.chronoengine.com/faqs/58-cfv4/cfv4-elements-and-html/2631-how-can-i-get-information-about-the-current-page.html:
1:
[page_url] => http://www.my-domain.com/index.php?option=com_chronoforms5&chronoform=Request-a-Quote-Holidays
2:
[page_title] => [this showed my SITE title]
3:
[page_url] => http://www.my-domain.com/index.php
4:
[page_url] =>
(i.e. nothing)
Now, none of those results get sent in the Email body. That cell is always empty. Also, in the Debug Info pane, the cell is empty too:
i.e.
<tr><td>Page Title</td><td></td></tr>
Please note, that actually, even if we can see results in the Data Array pane, they aren't actually the results I want anyway - The URL is wrong, presumably as we aren't using Relative URL's, and the site title is showing where I hoped it'd be the url or article title).
Any thoughts?
OK I don;t know if you wanted all of the debug info or just the bit we're looking at, so here is just the bit we're looking at. Note that I have used the code examples you gave in your FAQ page, and have pasted the results by the number of your example of the FAQ page at http://www.chronoengine.com/faqs/58-cfv4/cfv4-elements-and-html/2631-how-can-i-get-information-about-the-current-page.html:
1:
[page_url] => http://www.my-domain.com/index.php?option=com_chronoforms5&chronoform=Request-a-Quote-Holidays
2:
[page_title] => [this showed my SITE title]
3:
[page_url] => http://www.my-domain.com/index.php
4:
[page_url] =>
(i.e. nothing)
Now, none of those results get sent in the Email body. That cell is always empty. Also, in the Debug Info pane, the cell is empty too:
i.e.
<tr><td>Page Title</td><td></td></tr>
Please note, that actually, even if we can see results in the Data Array pane, they aren't actually the results I want anyway - The URL is wrong, presumably as we aren't using Relative URL's, and the site title is showing where I hoped it'd be the url or article title).
Any thoughts?
Hi Bob
Quick update... Using this code (a very slight change to your own):
<?php
$jdoc = \JFactory::getDocument();
?>
<input type='hidden' name='page_title' id='page_title' value='<?php echo $jdoc->gettitle(); ?>' />
(lower-case 't' in the getTitle command)
...I was able to get the actual Article title into the Data Array. Still doesn't make it through to my email though😟
Cheers
Matt
Quick update... Using this code (a very slight change to your own):
<?php
$jdoc = \JFactory::getDocument();
?>
<input type='hidden' name='page_title' id='page_title' value='<?php echo $jdoc->gettitle(); ?>' />
(lower-case 't' in the getTitle command)
...I was able to get the actual Article title into the Data Array. Still doesn't make it through to my email though😟
Cheers
Matt
In case I've muddied the waters with my droning on, this is where I'm at after using the Custom Code in my post above:
This is private content
Boom. That was it. Thanks.
For anyone else reading this with this issue:
Go to the Setup Tab > Email Pane > Edit. Then scroll down to the Template Generation selector, select Custom, and edit the code. Find where you have the bit in the code where it says {custom} and change that to whatever your custom field is called - in my case it was Page Title, so put {page_title}.
That fixed it, thanks Bob.
For anyone else reading this with this issue:
Go to the Setup Tab > Email Pane > Edit. Then scroll down to the Template Generation selector, select Custom, and edit the code. Find where you have the bit in the code where it says {custom} and change that to whatever your custom field is called - in my case it was Page Title, so put {page_title}.
That fixed it, thanks Bob.
This topic is locked and no more replies can be posted.
