Forums

Article title in drop down

GreyHead 14 May, 2010
Hi vistech,

Yes that's a ChronoConnectivity post rather then ChronoForms. ChronoConnrctivity is designed to display list of entries from a table; in ChronoForms you have to code that yourself. It will be something like
<?php
if ( !$mainframe->isSite() ) { return; }
$db =& JFactory::getDBO();
$query = "
  SELECT `title`
    FROM `#__content`
    WHERE `catid` = 'xxx' AND `secid` = 'yyy' 
    ORDER BY `title` ;
";
$db->setQuery($query);
$titles = $db->loadResultArray();
foreach ( $titles as $title )  {
   echo "<div>$title</div>";
}
?>
Not checked and will need debugging.

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