I'm trying to populate a tableselect on a form of a custom module. The tableselect is actually visible, but it's displaying the #empty
message. I've simplified it to this code:
$form['my_module_overview'] = array(
'#type' => 'tableselect',
'#header' => array('parent' => t('Parent'), 'child' => t('Child')),
'#options' => array(
1 => array('parent' => 'test1', 'child' => 'test2'),
2 => array('parent' => 'test3', 'child' => 'test4')),
'#empty' => t('There are no relationships defined yet.'),
'#multiple' => TRUE,
);
So I'm seeing the table with the correct headers, but with the message "There are no ...".
I think I'm donig it correct, as the options array contains key-value-pairs with the values being arrays again. And those arrays have the header keys as keys ('parent' and 'child').
So how can I get the data to become visible in my tableselect?