Ajax callback triggered by select.
1 string reference to 'ajax_forms_test_simple_form_select_callback'
- ajax_forms_test_simple_form in modules/
simpletest/ tests/ ajax_forms_test.module - A basic form used to test form_state['values'] during callback.
File
- modules/
simpletest/ tests/ ajax_forms_test.module, line 76 - Simpletest mock module for Ajax forms testing.
Code
function ajax_forms_test_simple_form_select_callback($form, $form_state) {
$commands = array();
$commands[] = ajax_command_html('#ajax_selected_color', $form_state['values']['select']);
$commands[] = ajax_command_data('#ajax_selected_color', 'form_state_value_select', $form_state['values']['select']);
return array(
'#type' => 'ajax',
'#commands' => $commands,
);
}