You are here

function ajax_example_autocheckboxes_callback in Examples for Developers 7

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

1 string reference to 'ajax_example_autocheckboxes_callback'
ajax_example_autocheckboxes in ajax_example/ajax_example.module
Form manipulation through AJAX.

File

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

Code

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