How to show same form multiple time on a page

    You can use hook_forms($form_id) to do this You can call forms using this code with passing data to it
    <?php
    function hpsolan_forms_page($data = array()) {
      for (
    $i=0; $i < count($data); $i++) {
       
    $output  = drupal_get_form("hpsolan_message_form_" . $i, $data[$i]);
      }
      return
    $output;
    }
    ?>
    Use hook_forms() if form does not found it will look here
    <?php
    function hpsolan_forms($form_id) {
     
    $forms = array();
      if (
    strpos($form_id, 'hpsolan_message_form_') === 0) {
       
    $forms[$form_id] = array(
         
    'callback' => 'hpsolan_message_form',
        );
      }
      return
    $forms;
    }
    ?>
    The orignal form which is called
    <?php
    function hpsolan_message_form($form_state, $thing) {
     
    $form = array();

     
    $form['to'] = array(
       
    '#type' => 'textfield',
       
    '#title' => t('To'),
      );
     
    $form['message'] = array(
       
    '#type' => 'textarea',
       
    '#title' => t('Message'),
       
    '#cols' => 80,
       
    '#rows' => 5,
      );
      return
    $form;
    }
    ?>
    5
    Average: 5 (1 vote)