I want at the fieldset of a joomla module to echo an option with some fetched results from my db:
<config>
<fields name="params">
<fieldset name="basic">
<field>
<?php
$db =& JFactory::getDBO();
$query = $db->getQuery(true);
$query->select('*');
$query->from('#__menu_types');
$db->setQuery($query);
$options = $db->loadObjectList();
echo "<select>";
echo "<option value=''>select a category</option>";
foreach($options as $row) {
echo "<option value='" . $row->id ."'>" . $row->title . "</option>";
}
echo "</select>";
?>
</field>
</fieldset>
I know that this code is completly wrong (just posted it to show you what I want to do ), but I allready searched for modules that do something similar and I found out, that they don't use php code inside xml.
So I guess there is another way, but I can't understand on my own, as I am completely new to Joomla and Joomla development.
Thanks in Advance.