1 ajax_forms_test.module | ajax_forms_test_simple_form_checkbox_callback($form, $form_state) |
Ajax callback triggered by checkbox.
File
- core/
modules/ simpletest/ tests/ ajax_forms_test.module, line 85 - Simpletest mock module for Ajax forms testing.
Code
function ajax_forms_test_simple_form_checkbox_callback($form, $form_state) {
$commands = array();
$commands[] = ajax_command_html('#ajax_checkbox_value', (int) $form_state['values']['checkbox']);
$commands[] = ajax_command_data('#ajax_checkbox_value', 'form_state_value_select', (int) $form_state['values']['checkbox']);
return array('#type' => 'ajax', '#commands' => $commands);
}