Is it possible to replace more than one form element (wrappers) triggered by only one #ajax trigger element? function ajax_example_simplest($form, &amp;$form_state) {

  //This is my ajax trigger element
  $form['element_trigger'] = array(
    '#type' =&gt; 'select',
    '#options' =&gt; array(
      'one' =&gt; 'one',
      'two' =&gt; 'two',
      'three' =&gt; 'three',
    ),
    '#ajax' =&gt; array(
      'callback' =&gt; 'ajax_example_simplest_callback',

      /** Q: Can I somehow declare more than one wrapper? **/
      //Say for instance, something like:
      'wrapper' =&gt; array('replace_div_1', 'replace_div_2'),

     ),
  );

  //replace_div_1
  $form['element_to_be_replaced_1'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t("My conditional field one"),
    '#prefix' =&gt; '&lt;div id="replace_div_1"&gt;',
    '#suffix' =&gt; '&lt;/div&gt;',
  );


 //... more form elements here

  //replace_div_2
  $form['element_to_be_replaced_2'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t("My conditional field two"),
    '#prefix' =&gt; '&lt;div id="replace_div_2"&gt;',
    '#suffix' =&gt; '&lt;/div&gt;',
  );
  return $form;
}

function ajax_example_simplest_callback($form, $form_state) {

  //... do my stuff here


  //normally I would return only the form bit for replacing a single wrapper
  //declared in the trigger element, like this:
  return $form['element_to_be_replaced_blahblah'];

}


Is it possible to return more than one form bit in the callback function telling the AJAX framework that $form['element_to_be_replaced_1'] should replace &lt;div id="replace_div_1"&gt; and $form['element_to_be_replaced_2'] should replace &lt;div id="replace_div_2"&gt;?
Instead of returning the HTML of the single element to update, your ajax callback can return an array of ajax commands. So it can return two ajax_command_replace to replace each element.

function ajax_example_simplest_callback(&amp;$form, $form_state) {
  return array(
    '#type' =&gt; 'ajax',
    '#commands' =&gt; array(
      ajax_command_replace("#replace_div_1", render($form['element_to_be_replaced_1'])),
      ajax_command_replace("#replace_div_2", render($form['element_to_be_replaced_2']))
    )
  );
}