Form post tag missing I am writing a module which uses a template to output results from a database; these results can be edited. I use a form with a fieldset of submit buttons. Each result has an edit button. I get the buttons rendered but there is no &lt;form&gt; tag so nothing happens when the buttons are hit.
Below is my code. I believe I am missing something fundamental, or there is a better way to do it.

  function eventhistory_menu() {
    $items['personal-history'] = array(
      'title' =&gt; 'Event history',
      'page callback' =&gt; 'historypage_rendered',
      'access callback' =&gt; TRUE,
    );

    return $items;
  }

  function eventhistory_theme() {
    return array(
      'eventhistory_template' =&gt; array(
        'variables' =&gt; array('output' =&gt; NULL, 'hist_form' =&gt; NULL),
        'template' =&gt; 'eventhistory_template',
      ),
    );
  }


  function historypage_rendered() {
    $output = array(
      '#theme' =&gt; 'eventhistory_template',
      '#type' =&gt; 'markup',
      '#hist_form' =&gt; drupal_get_form('historyEdit_form'), 
      '#output' =&gt; getHistory(),
    );

    return $output;
  }

 function historyEdit_form($form, &amp;$form_state) {
   $form['#tree'] = TRUE;
   $num_hist = 0;

   $form['history']  = array(
     '#type' =&gt; 'fieldset',
   );

   if ($form_state['hist_num']) {
     for ($i = 1; $i &lt;= $form_state['hist_num']; $i++) {
       $form['history']['num' . $i] = array(
         '#value' =&gt; 'Edit',
         '#type' =&gt; 'submit',
       );
     }
   }

   return $form;
 }


In the template I have print drupal_render($hist_form['history']['num' . $count]);. The buttons show, but they are not surrounded by any &lt;form&gt; tag. 

What am I doing wrong?
Your way of implementation is partially wrong. Please try it like that:

function eventhistory_menu() {
  $items['personal-history'] = array(
    'title' =&gt; 'Event history',
    'page callback' =&gt; 'drupal_get_form',
    'page arguments' =&gt; array('eventhistory_edit_form'),
    'theme callback' =&gt; 'eventhistory_template',
    'access callback' =&gt; TRUE,
  );

  return $items;
}

function eventhistory_theme($existing, $type, $theme, $path) {
  return array(
    'eventhistory_template' =&gt; array(
      'variables' =&gt; array('output' =&gt; NULL, 'hist_form' =&gt; NULL),
      'template' =&gt; 'eventhistory_template',
    ),
  );
}


function eventhistory_edit_form($form, &amp;$form_state) {
 $form['#tree'] = TRUE;
 $num_hist = 0;

 $form['history']  = array(
   '#type' =&gt; 'fieldset',
 );

 if ($form_state['hist_num']) {
   for ($i = 1; $i &lt;= $form_state['hist_num']; $i++) {
     $form['history']['num' . $i] = array(
       '#value' =&gt; 'Edit',
       '#type' =&gt; 'submit',
     );
   }
 }

 return $form;
}


I've discarded the historypage_rendered function from your code and called the form directly in hook_menu implementation. I also added the theme callback to hook_menu, and also renamed your form function to follow Drupal coding standards.