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 AJAX Advanced Commands for more details on AJAX framework commands.
Return value
array: The renderable array for the checkboxes fieldset.
Related topics
File
- modules/
examples/ ajax_example/ ajax_example.module, line 421 - Hook implementations for the AJAX Example module.
Code
function ajax_example_autocheckboxes_callback($form, $form_state) {
return $form['checkboxes_fieldset'];
}