How to show two dropdown select lists using a single ajax call in form api .? I have a form in which user needs to input his height. I have two radio buttons to select the format in which the user wishes to input his height. one is  "feet-inch" and  another is "centimeters". I want to show a dropdown if "feet-inch" is selected, or else a textfield if "centimeters"is selected using ajax.

Am being able to show the textfield and a single dropdown successfully with ajax call triggered from the selection of the radio buttons, But I need to have two dropdowns, one to select "feet" and another to select "inches" right..?

So my problem is that am not being able to show two dropdowns with one single ajax call.
How can I achieve it...?? Or in other words, how can I replace two separate divs (both containing a dropdown select) with one single ajax call..?  

Alseo do let me know, if there are  any other better ways to achieve this kind of height selection form..? 

Please provide, codes for both form elements and the ajax call if possible.

Thanks in advance.

////  EDIT   /////

I put both select fields inside a fieldset and wrapped that fieldset with the wrapper to be replaced. and put it inside the something_form() function with an if statement. I dont know where am going wrong... Below is my code, please show me wats wrong....

&lt;?php
function my_form($form,&amp;form_state)
{
$form['health_set']['height_set'] = array(
        '#title'=&gt;t('Input your height'),
        '#type'=&gt;'fieldset',
            '#tree'=&gt;TRUE,
            );

$form['health_set']['height_set']['height_radio'] = array(
    '#title' =&gt; t("Height input format"),
    '#type' =&gt; 'radios',
    '#options' =&gt; array(
      1 =&gt; t('feet'),
      2 =&gt; t('centimeters'),
      ),

    '#required'=&gt;TRUE,
    '#ajax' =&gt; array(
       'callback' =&gt; 'health_height_callback',
       'wrapper' =&gt; 'health_height-wrapper',
      'effect'=&gt;'slide',
     ),
    );

if($form_state['values']['health_set']['height_set']['height_radio']==1)
{

$form['health_set']['height_set']['feet-inch'] = array(
   '#type'=&gt;'fieldset',
   '#tree'=&gt;TRUE,
    '#prefix'=&gt;'&lt;div id="health_height-wrapper"&gt;',
    '#suffix'=&gt;'&lt;/div&gt;',
  );

      $options1 = array(
    1=&gt;t('1 ft'),
        2=&gt;t('2 ft'),
        3=&gt;t('3 ft'),
        4=&gt;t('4 ft'),
        5=&gt;t('5 ft'),
    6=&gt;t('6 ft'),
    7=&gt;t('7 ft'),
     );  



$form['health_my_bmi']['height_set']['feet-inch']['feet'] = array(
        '#type'=&gt;'select',
        '#options'=&gt;$options1,
        '#required'=&gt;TRUE,
        '#description'=&gt;t('Whats your height in feet?'),
      );

$options2 = array(
    1=&gt;t('1 inch'),
        2=&gt;t('2 inch'),
        3=&gt;t('3 inch'),
        4=&gt;t('4 inch'),
        5=&gt;t('5 inch'),
    6=&gt;t('6 inch'),
    7=&gt;t('7 inch'),
        8=&gt;t('8 inch'),
        9=&gt;t('9 inch'),
        10=&gt;t('10 inch'),
        11=&gt;t('11 inch'),
     );

$form['health_set']['height_set']['feet-inch']['inch'] = array(
       '#type'=&gt;'select',
        '#options'=&gt;$options2,
        '#title'=&gt;t('Inches'),
        '#description'=&gt;t('how many inches ?'),
        '#required'=&gt;TRUE,

      );

}

else if($form_state['values']['health_set']['height_set']['height_radio']==2)
{

   $form['health_set']['height_set']['centi'] = array(
        '#type'=&gt;'textfield',
        '#title'=&gt;'Height in centimeters',
        '#prefix'=&gt;'&lt;div id="health_height-wrapper"&gt;',
        '#suffix'=&gt;'&lt;/div&gt;',
         '#maxlength'=&gt;3,
         '#size'=&gt;6,
        '#required'=&gt;TRUE,
      );

}

  return $form;

}
?&gt;


below is the code of the callback function,

&lt;?php
function health_height_callback($form, $form_state)
{
       if($form_state['values']['health_set']['height_set']['height_radio']==1)
           return $form['health_set']['height_set']['feet-inch'];

      else if($form_state['values']['health_set']['height_set']['height_radio']==2)
           return $form['health_set']['height_set']['centi'];

}
?&gt;
I'm not sure exactly. But if you just want to show some FAPI elements based on the condition that radio is X or Y .... I would just use #states in the D7 FAPI api.