How to handle ajax wrapper id for list of similar ajax forms?
You can use drupal_html_id() which:


  Prepares a string for use as a valid HTML ID and guarantees uniqueness.


e.g.

function my_form($form, &amp;$form_state) {
  $id_string = 'my-element-id';
  $unique_id = drupal_html_id($id_string);

  $form['element'] = array(
    '#type' =&gt; 'select',
    '#options' =&gt; $options,
    '#ajax' =&gt; array(
      'wrapper' =&gt; $unique_id,
      // ...
    )
  );

  $form['output'] = array(
    '#prefix' =&gt; '&lt;div id="' . $unique_id . '"&gt;',
    '#suffix' =&gt; '&lt;/div&gt;',
    '#markup' =&gt; 'Some markup'
  );
}


That should guarantee that the AJAX will work no matter how many different instances of the same form you create.