I’m struggling with how to get a form-submit to return the results of a database select-query. I can build the form and the submit-function does the select-query to collect the results and builds a render-array:
$table = array(
'#theme' => 'table',
'#header' => array(t($field_1), t($field_2)),
'#rows' => $tableRowS,
);
However I can’t figure out how to get drupal to render this table instead of just rebuilding and showing the empty form again. I’ve examined the concept of redirect but don’t see a way of passing the table to the redirected page.
Any help would be appreciated.