Fill form on ajax callback Seems to be an extremely simple question. But I can't figure it out. In my module's form I need to load form values depend on the value of certain one and rebuild the form using those.

here is the part of the code (form builder):

$namevalue = isset($form_state['values']['name']) ? $form_state['values']['name'] : "";
$form['name'] = array(
    '#type' =&gt; 'textfield',
    '#default_value' =&gt; $namevalue
);
$form['load_settings'] = array(
    '#type' =&gt; 'button',
    '#value' =&gt; t('Load my settings'),
    '#ajax' =&gt; array(
        'callback' =&gt; 'simplenews_mod_load_subscriptions',
    )
);


Here is the callback:

function simplenews_mod_load_subscriptions( $form, &amp;$form_state){
  $form_state['values']['name'] = "loaded value"; // here will be a function which will get the value form DB
  return $form_state;
}


Nothing changes in the $form_state array.
I think I just don't get the basis of ajax in D7 itself... I'd be very appreciated if someone show my the simplest example of how to change a form field value using ajax. 

Or alternatively: how do I rebuild form with new values using custom submit callback. Not on validation.

Thank you.
the problem was in the way I pass submit callback. It should be like

'#submit' =&gt; array('foo_submit_callback')


ARRAY!

the less visible thing is the most visible one...