I am trying to display a form (as a table of rows). I have the table itself displaying and the "Weights" column showing, but none of the other fields/columns are displaying any content. When I look during debug the form structure seems to be filled with data OK. This is a conversion from a D6 form of the statspro module (which I have never seen, so I cannot be 100% sure that it worked in D6)
<?php
function statspro_path_aggregator_list_form($form) {
$result = db_query('SELECT
n.spaid, n.name, n.weight
FROM {statspro_path_aggregator} n
ORDER BY n.weight,
n.name,
n.spaid');
$form = array('#theme' => 'statspro_path_aggregator_list_form');
$edit = t('Edit');
$delete = t('Delete');
foreach ($result as $row) {
$spaid = (int) $row->spaid;
$element = _statspro_form_field_name('aggregator', $spaid);
$form[$element] = array('#type' => 'fieldset');
$subelement = _statspro_form_field_name('spaid', $spaid);
$form[$element][$subelement] = array(
'#title' => (int) $row->spaid,
'#type' => 'item',
);
$subelement = _statspro_form_field_name('name', $spaid);
$form[$element][$subelement] = array(
'#title' => $row->name,
'#type' => 'item',
);
$subelement = _statspro_form_field_name('weight', $spaid);