Advise on how to syntax to display calc data in a dropdown menu for selection


New Member

My data from calc field are currently display in a text list

$rows = $myDb->loadObjectList();
$list = array();
foreach ($rows as $row)

$list[] = "<li>" . $row->subactivity_name . "</li>";

I need to list the data in a dropdown so I can select an option. I tried some php coding but obviously I am missing some syntax in terms of fabrik or joomla for the calc field.

Any advise or direction in resolving it is much appreciated.

Instead of a calc use a dropdown element with "Eval populate"
Hello @troester

I did manage to the above with the calc field but I am having some issues with it CSS so I thought trying your suggetion with the dropdown. However I am having some syntax error with the data-where sql clause. Can you please tell me what's wrong with the following syntax in data-where clause under dropdown menu. As far as I could understand from wiki and forum question this should be it but its not since I get an error.

WHERE {thistable}.`subactivity_name`
select array('subactivity.subactivity_name') from 'subactivity'
join 'INNER', 'intemgroup1 ON'
join 'INNER', 'projects ON'
join 'INNER', 'activities ON'
where 'projects.project_name = ' . $myDb->quote('{overlapping___project_1}')
where 'activities.activity_name = ' . $myDb->quote('{overlapping___activity_1}')

Following is my query in the calc field that works.
->join('INNER', 'intemgroup1 ON')
->join('INNER', 'projects ON')
->join('INNER', 'activities ON')
->where('projects.project_name = ' . $myDb->quote('{overlapping___project_1}') )
->where('activities.activity_name = ' . $myDb->quote('{overlapping___activity_1}'));

Thank you very much @troester if you can help or point to direction how to resolve it.

We are in need of some funding.
More details.

Thank you.

Members online

No members online now.