Replace textfield value on ajax callback
function test($form, &amp;$form_state) {
  $form['your_name'] = array(
    '#title' =&gt; t('Your or your company name'),
    '#type' =&gt; 'textfield',
    '#prefix' =&gt; '&lt;div id ="subscribers-name"&gt;',
    '#suffix' =&gt; '&lt;/div&gt;',
  );
  if (isset($form_state['values']['your_name'])) {
    $form['your_name']['#value'] = 'if';
  }
  else {
    $form['your_name']['#value'] = 'else';
  }
  $form['load_settings'] = array(
    '#type' =&gt; 'button',
    '#value' =&gt; t('Load my settings'),
    '#submit' =&gt; 'simplenews_mod_load_subscriptions',
    '#ajax' =&gt; array(
      'wrapper' =&gt; 'subscribers-name',
      'callback' =&gt; 'simplenews_mod_load_subscriptions_ajax',
      'method' =&gt; 'replace',
    )
  );
  return $form;
}

function simplenews_mod_load_subscriptions_ajax($form, &amp;$form_state) {
  return $form['your_name'];
}