function ajax_forms_test_simple_form_checkbox_callback

Ajax callback triggered by checkbox.

1 string reference to 'ajax_forms_test_simple_form_checkbox_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 86

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,
  );
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.