Hello,
I have a website, where within each article, there is a Chronoform contact form included. I need to have a function in each form, where the item title is captured automatically to a hidden field, and the information on the form + the item title emailed to me. I did this succesfully when I used Chronoforms only with Joomla articles, but when I switched to using K2, the code apparently doesn't work anymore. I tried to fix it according to by best knowhow (I'm not very experienced) by comparing the MySQL tables of k2_items and com_content, and fixing with that, without success. Please find the code I'm using at the moment (not used with Joomla/Chronoforms, only with Joomla/Chronoforms/K2).
My other problem is that since I'm using also the "Tabs and Slices in content items" plugin from Joomlaworks, and I show the articles in blog format, Chronoforms puts all the date/time pickers of each category inside to the first form, meaning that for example if I have five articles in a category, Chronoforms shows the date/time picker five times in the first article, and it does not appear anymore on the other forms. Any ideas how to fix that?
Thank you!
Jari
I have a website, where within each article, there is a Chronoform contact form included. I need to have a function in each form, where the item title is captured automatically to a hidden field, and the information on the form + the item title emailed to me. I did this succesfully when I used Chronoforms only with Joomla articles, but when I switched to using K2, the code apparently doesn't work anymore. I tried to fix it according to by best knowhow (I'm not very experienced) by comparing the MySQL tables of k2_items and com_content, and fixing with that, without success. Please find the code I'm using at the moment (not used with Joomla/Chronoforms, only with Joomla/Chronoforms/K2).
<?php
if ( !$mainframe->isSite() ) { return; }
$title = JRequest::getString('title', '', 'get');
?>
<?php
if ( !$mainframe->isSite() ) { return; }
$article_id = JRequest::getInt('id');
$title = '';
if ( $article_id ) {
$db =& JFactory::getDBO();
$query = "
SELECT `title`
FROM `jos_k2_items`
WHERE `id` = ".$db->quote($article_id)." ;
";
$db->setQuery($query);
$title = $db->loadResult();
}
?>
<input type='hidden' name='title' id='title' value='<?php echo $title; ?>' />
My other problem is that since I'm using also the "Tabs and Slices in content items" plugin from Joomlaworks, and I show the articles in blog format, Chronoforms puts all the date/time pickers of each category inside to the first form, meaning that for example if I have five articles in a category, Chronoforms shows the date/time picker five times in the first article, and it does not appear anymore on the other forms. Any ideas how to fix that?
Thank you!
Jari