Pulldown with database entries not working on CF8

How to fix pulldown with database entries not working in ChronoForms 8 after migration from CF7.

Overview

The problem is that ChronoForms 8 uses different placeholder syntax for database query results in dynamic pulldown options.
In ChronoForms 8, replace the CF7 placeholder {var:summary} with {row:summary} in the Dynamic Options settings of your pulldown element.

Answered
ChronoForms v8

Dear all,

in CF7, this form works fine. But after importing and testing on CF8, there are no more options fetched from the database. Does anyone see where I have to adapt the script? I am not a programmer, so please bear with me.

$current_day = JFactory::getDate('+0 seconds');

$current_day = $current_day->toUnix();

$options = array();

$db =& JFactory::getDBO();$query = "

SELECT

#__jevents_vevdetail.dtstart,

#__jevents_vevdetail.summaryFROM

#__jevents_vevdetailINNER JOIN #__jevents_vevent ON #__jevents_vevdetail.evdet_id = #__jevents_vevent.detail_id

WHERE    #__jevents_vevdetail.dtstart > " . $current_day ." AND   

#__jevents_vevent.access = 1 AND   

#__jevents_vevent.state >= 1

order by #__jevents_vevdetail.dtstart;

";

$db->setQuery($query);

return $db->loadAssocList();

foreach ( $data as $d ) { 

$options[] = "<option value='{$d->summary}'>{$d->summary}</option>";

}

Thanks for your precious help!

Martin

ty typomaniac 18h ago
Answer

Issue solved. Thanks for the hint: instead of {var:summary} I have to use {row:summary} in CF8.

Max_admin Max_admin 10h ago

Great, thanks for posting the solution.

That's it, you have to use {row:summary} in the Dynamic Options settings

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Post a Reply