1 ajax_forms_test.module ajax_forms_test_simple_form_select_callback($form, $form_state)

Ajax callback triggered by select.

File

core/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);
}