Ajax in drupal 7 dont return values Im in drupal 7, i need to make a select with many options, depends of the option taken, in a textarea will be loaded several values in a string.

After hours of test i come here for help.

Im working on a basic page:

function ajax_load_all_admins($form, &amp;$form_state) {
    $form = array();
    $form['changethis'] = array(
        '#type' =&gt; 'select',
        '#options' =&gt; array(
            '' =&gt; '',
            '1' =&gt; 'Cargar todos los admins'
        ),
        '#ajax' =&gt; array(
            'event' =&gt; 'change',
            'callback' =&gt; 'ajax_load_all_admins_callback',
            'wrapper' =&gt; 'listaCorreos-div'
        )
    );

    $form['listaCorreos'] = array(
        '#type' =&gt; 'textarea',
        '#prefix' =&gt; '&lt;div id="listaCorreos-div"&gt;',
        '#suffix' =&gt; '&lt;/div&gt;'
    );

    if (!empty($form_state['values']['changethis'])) {
        $payments_list = db_query('QUERY WORKING WELL');  

        $value = '';
        foreach ($payments_list as $payment) {
            $value .= $payment-&gt;admin . ',';
        }
        trim($value, ',');
        $form['listaCorreos']['#default_value'] = $value;
    }

    return $form;
}

function ajax_load_all_admins_callback($form, $form_state) {
    return $form['listaCorreos'];
}

$form = drupal_get_form('ajax_load_all_admins');
print drupal_render($form);


The Ajax call is working but i only recibe:

0: {command:settings, settings:{basePath:/, pathPrefix:,…}, merge:true}


No other one position.

I think it can be for the drupal_render, but dont know why?

Thanks in advice.
After 1 week searching and trying things at home i decide to make a separate module for the form.

When i pass the code to a module all works fine with the same code.

I think for any reason Drupal needs to render form by his own, not forced like i was doing with the next code in a simple view:

$form = drupal_get_form('ajax_load_all_admins');
print drupal_render($form);


Hope this help, dont try to make Ajax calls inside a simple view like i tried.