Form API ajax optionsを確認してください。具体的には、field_attach_update を呼び出す ajax['callback'] 関数を定義する必要があると思います。
<?php
function my_form_func($form, $form_state) {
$my_checkbox_val = isset($form_state['values']['my_checkbox']) ? $form_state['values']['my_checkbox'] : NULL;
$form['my_checkbox'] = array(
'#type' => 'checkbox',
'#title' => t('Check me'),
'#default_value' => $my_checkbox_val,
'#return_value' => $nid, // Assuming you are working with a node, but could be any entity
'#ajax' => array(
'callback' => 'my_form_field_update_func',
'event' => 'click',
),
);
return $form;
}
function my_form_field_update_func($form, $form_state) {
if (isset($form_state['values']['my_checkbox'])) {
$node = node_load($form_state['values']['my_checkbox']);
field_attach_update('node', $node);
}
return $form['my_checkbox'];
}
?>