Forums

Tracking form submissions

maaji 14 Jul, 2012
hi, i am using ChronoForm 4.0 RC3.21 ,
i am using Chrono as a product order form in K2 Content is it possible when someone submit order form then i get Content page URL or name in email?
if it is possible then please help me please.
andypooz 19 Jul, 2012
This page shows you how to get the page URL using PHP
http://webcheatsheet.com/php/get_current_page_url.php
You can place this value into a hidden field so that it is sent with the rest of the form data on submit.
You can add a custom code element before show html and add the required php to place the url into a variable (eg. $pageurl), and then inside the value of the hidden field in the wizard write <?php echo $pageurl; ?>
GreyHead 20 Jul, 2012
Hi Maaji,

Joomla! has some code to do this and you can use it to save the page URL or title in a hidden input in your form.

For the URL add a Custom Element from the Advanced Elements Group to the Preview box and put this code into it:
<input type='hidden' name='page_url' id='page_url' value='<?php echo JURI::root(); ?>' />

For the page title use this code:
<?php
$doc =& JFactory::getDocument();
?>
<input type='text' name='page_title' id='page_title' value='<?php echo $doc->getTitle(); ?>' />

Bob
This topic is locked and no more replies can be posted.