function ajax_forms_test_validation_form_callback

Same name in other branches
  1. 9 core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module \ajax_forms_test_validation_form_callback()
  2. 8.9.x core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module \ajax_forms_test_validation_form_callback()
  3. 10 core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module \ajax_forms_test_validation_form_callback()
  4. 11.x core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module \ajax_forms_test_validation_form_callback()

Ajax callback for the 'drivertext' element of the validation form.

1 string reference to 'ajax_forms_test_validation_form_callback'
ajax_forms_test_validation_form in modules/simpletest/tests/ajax_forms_test.module
This form and its related submit and callback functions demonstrate not validating another form element when a single Ajax element is triggered.

File

modules/simpletest/tests/ajax_forms_test.module, line 475

Code

function ajax_forms_test_validation_form_callback($form, $form_state) {
    drupal_set_message("ajax_forms_test_validation_form_callback invoked");
    drupal_set_message(t("Callback: drivertext=%drivertext, spare_required_field=%spare_required_field", array(
        '%drivertext' => $form_state['values']['drivertext'],
        '%spare_required_field' => $form_state['values']['spare_required_field'],
    )));
    return '<div id="message_area">ajax_forms_test_validation_form_callback at ' . date('c') . '</div>';
}

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