Drupal7 Get results from a form in a table I want to show my result from the form in the table on the same page.

//my form
function find_tryk_filter_test_form_page($form, &amp;$form_state)
{
$form['submit']         = array(
    '#type' =&gt; 'submit',
    '#value' =&gt; t('Find trykluft element'),
    '#ajax' =&gt; array(
        'callback' =&gt; 'find_tryk_filter_test_ajax_result_callback',
        'wrapper' =&gt; 'result-wrapper',
        'method' =&gt; 'click'
    )
);

return $form;
}


My page callback function

function find_tryk_filter_test_page()
{
  $page = drupal_render(drupal_get_form('find_tryk_filter_test_form_page'));
  $page .= filter_elementer_rows($form_state['values']['dropdown_third']);
  print_r($page);
  return $page;
}


The function that retrives my data and create the table

function filter_elementer_rows($value_dropdown_third)
{
  $header = array(
    'Navn',
    'Shoplink',
    'Brochure'
   );
  $query  = db_query(//Some sql statement...));
  $rows   = array();
  foreach ($query as $row) {
    $rows[] = array(
        $row-&gt;title,
        $row-&gt;field_shoplink_value,
        $row-&gt;uri
    );
}
  return theme('table', array(
    'header' =&gt; $header,
    'rows' =&gt; $rows
  ));
}


My submit function

function find_tryk_filter_test_page_submit($form, &amp;$form_state)
{
   return find_tryk_filter_test_page();
}


My problem is that when I run this, I get absolutely nothing in the table. And the SQL does work. Do I miss anything?
The return value from a form submit function isn't used. What you need to to is rebuild the form, and alter the original form function to display the table if it's available. For example:

function find_tryk_filter_test_form_page($form, &amp;$form_state) {
  if (isset($form_state['render_table'])) {
    $form['table'] = array('#markup' =&gt; find_tryk_filter_test_page());
  }

  $form['submit'] = array( 
   '#type' =&gt; 'submit',
    '#value' =&gt; t('Find trykluft element'),
    '#ajax' =&gt; array(
        'callback' =&gt; 'find_tryk_filter_test_ajax_result_callback',
        'wrapper' =&gt; 'result-wrapper',
        'method' =&gt; 'click'
    )
  );

  return $form;
}

function find_tryk_filter_test_page_submit($form, &amp;$form_state) {
   $form_state['render_table'] = TRUE;
   $form_state['rebuild'] = TRUE;
}


Or you might redirect to a page that has your table on it, if that makes sense:

function find_tryk_filter_test_page_submit($form, &amp;$form_state) {
   $form_state['redirect'] = 'foo/bar/path';
}