Ajax callback change "checked" radio button I have a radio button group like this:

$options = array('2' =&gt; t('Active (2)'), '1' =&gt; t('Upcoming (1)'), '0' =&gt; t('Finished (0)'));
$form['active'] = array(
'#type' =&gt; 'radios',
'#title' =&gt; t('Update state:'),
'#default_value' =&gt; $default_entry-&gt;active,
'#options' =&gt; $options,
);


which works fine. However, based on a drop-down list of entries, it calls an ajax function which should update the selection:

foreach (array('name', 'test') as $item) {
$form[$item]['#value'] = $entry-&gt;$item;
}
foreach (array('active') as $item) {
???
}


Now, the "name" and "test" work as expected as they are text fields.... but the active radio button stays the same as it was (i.e. based on the '#default_value').

I have tried

$form[$item]['#value'] = $entry-&gt;$item;
$form[$item]['#default_value'] = $entry-&gt;$item;


but neither change which radio button is selected. Is there something I'm missing based on updating the "checked" attribute for that radio group?

Any help and/or points in the right direction much appreciated.
You would need to show more code (the form definition), I would recommend you to try:

unset($form['input'][$item]);

Right prior to calling:

$form[$item]['#default_value'] = $entry-&gt;$item;

Relative links: https://www.drupal.org/node/1082818#comment-5335080