1 ajax_example.module ajax_example_autocheckboxes_callback($form, $form_state)

Callback for autocheckboxes.

Callback element needs only select the portion of the form to be updated. Since #ajax['callback'] return can be HTML or a renderable array (or an array of commands), we can just return a piece of the form. See @link ajax_example_advanced.inc AJAX Advanced Commands for more details on AJAX framework commands.

Return value

array Renderable array (the checkboxes fieldset)

Related topics

File

modules/examples/ajax_example/ajax_example.module, line 424
AJAX Examples module file with basic examples.

Code

function ajax_example_autocheckboxes_callback($form, $form_state) {
  return $form['checkboxes_fieldset'];
}