How can we achieve multiple forms in a single page? I have menu callback which is getting called multiple times on the same page by an AJAX request resulting rendering the form with same HTML id

$items['mymodule/page'] = array(
    'page callback' =&gt; 'drupal_get_form',
    'page arguments' =&gt; array('page_callback_form'),
    'access callback' =&gt; TRUE,
    'type' =&gt; MENU_CALLBACK,
  );

function page_callback_form($form, &amp;$form_state, $thing) {
  $form['message'] = array(
    '#type' =&gt; 'textarea',
    '#title' =&gt; t('Message'),
    '#cols' =&gt; 80,
    '#rows' =&gt; 5,
  );
  return $form;
}


Result:  &lt;textarea id="edit-message" name="message" cols="80" rows="5" class="form-textarea"&gt;&lt;/textarea&gt; 
&lt;textarea id="edit-message" name="message" cols="80" rows="5" class="form-textarea"&gt;&lt;/textarea&gt;

i was wondering is there a way i can have unique Ids, i have tried [hook_forms].1
You can do it!
With the drupal fapi. You can overload every HTML attributes by using the element #attributes.
Exemple:

  $form['form_element'] = array(
    '#type' => 'textfield',
    '#title' => t('If you Have a Code, Redeem it here:'),
    '#attributes' => array(
      'id' => 'your_id',
    ),
  );

If you add a counter or something to your id, you will have a different id for each fields.
Cheers