function form_test_clicked_button_validate

Form validation handler for the form_test_clicked_button() form.

File

modules/simpletest/tests/form_test.module, line 1841

Code

function form_test_clicked_button_validate($form, &$form_state) {
  if (isset($form_state['triggering_element'])) {
    drupal_set_message(t('The clicked button is %name.', array(
      '%name' => $form_state['triggering_element']['#name'],
    )));
  }
  else {
    drupal_set_message('There is no clicked button.');
  }
}

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