Cannot change checkboxes options in drupal form using AJAX callback
* Update using new code *

Form definition:

$form['tags']['ask_button'] = array(
  '#type' =&gt; 'button',
  '#value' =&gt; t('Next'),
  '#ajax' =&gt; array(
    'callback' =&gt; 'ajax_tag_callback',
    'wrapper' =&gt; 'replace_tagfield_div',
  ),
);
$form['tags']['values'] = array
(
  '#prefix' =&gt; '&lt;div id="replace_tagfield_div"&gt;',
  '#suffix' =&gt; '&lt;/div&gt;',
);
if(isset($form_state['values']))
{
  $final = drupal_map_assoc(array(t('SAT'), t('ACT')));
  $form['tags']['values']['question_tags'] = array(
    '#title' =&gt; t("Tags"),
    '#type' =&gt; 'textfield',
    '#value' =&gt; $tag_names, // Note - you didn't show how this is created
  );
  $form['tags']['values']['table'] = array(
    '#type' =&gt; 'checkboxes',
    '#options' =&gt; $final,
  );
}
else
{
  $form['tags']['values']['question_tags'] = array(
    '#title' =&gt; t("Tags"),
    '#type' =&gt; 'textfield',
  );
  $form['tags']['values']['table'] = array(
    '#type' =&gt; 'checkboxes',
    '#options' =&gt; drupal_map_assoc(array(t('SAT'), t('ACT'))),
  );
}


And your ajax callback will look like this:

function ajax_tag_callback($form, &amp;$form_state) {
  return $form['tags']['values'];
}


* Original response *

Not enough information provided to say for sure what your problem is, but it's likely one of these:

Problem 1:

You are making changes to the form in the ajax callback. You cannot do this. Here is how the form API works.

1) Form is generated

2) Form is cached on server

3) Form is sent to user

4) User initiates some ajax

5) Values are sent to server

6) Form is rebuilt, with submitted values

7) New form is cached on server

8) Form is sent to ajax callback

9) Relevant values are returned from ajax callback

10) Drupal sends data to browser, and the new parts of the form are injected into the page

11) User submits form

12) Drupal checks submitted values to the cached form, to see if the received values match the cached form, giving an error if they don't. This is the major strength of the Form API.

Step 7 and 8 are the key points here - the form has already been cached before it is sent to the ajax callback. So any changes you make won't be part of the cache causing errors.

Problem 2

You don't have a #prefix set on $form['tags']. You have only set the suffix. You need to provide a wrapper with your #ajax definition (which you didn't show us), so maybe the wrapper you have provided does not exist.