function _form_test_submit_values_json

Form submit handler to return form values as JSON.

11 string references to '_form_test_submit_values_json'
form_test_checkboxes_radios in drupal/core/modules/system/tests/modules/form_test/form_test.module
Form constructor to test expansion of #type checkboxes and radios.
form_test_checkboxes_zero in drupal/core/modules/system/tests/modules/form_test/form_test.module
form_test_color in drupal/core/modules/system/tests/modules/form_test/form_test.module
Form constructor for testing #type 'color' elements.
form_test_email in drupal/core/modules/system/tests/modules/form_test/form_test.module
Form constructor for testing #type 'email' elements.
form_test_language_select in drupal/core/modules/system/tests/modules/form_test/form_test.module
Builds a form to test the language select form element.

... See full list

File

drupal/core/modules/system/tests/modules/form_test/form_test.module, line 336
Helper module for the form API tests.

Code

function _form_test_submit_values_json($form, &$form_state) {

  // This won't have a proper JSON header, but Drupal doesn't check for that
  // anyway so this is fine until it's replaced with a JsonResponse.
  print drupal_json_encode($form_state['values']);
  drupal_exit();
}