function ahah_example_autocheckboxes_callback in Examples for Developers 6
Callback for autocheckboxes. Process the form with the number of checkboxes we want to provide.
1 string reference to 'ahah_example_autocheckboxes_callback'
- ahah_example_menu in ahah_example/
ahah_example.module - Implement hook_menu().
File
- ahah_example/
ahah_example_autocheckboxes.inc, line 71 - A Self-configure a form based on a select control. Add the number of checkboxes specified in the select.
Code
function ahah_example_autocheckboxes_callback() {
$form = ahah_example_callback_helper();
$checkboxes = $form['checkboxes'];
// Remove the wrapper so we don't double it up.
unset($checkboxes['#prefix'], $checkboxes['#suffix']);
$output = theme('status_messages');
$output .= drupal_render($checkboxes);
// Final rendering callback.
drupal_json(array(
'status' => TRUE,
'data' => $output,
));
exit;
}