function form_test_clicked_button_validate in Drupal 7
Form validation handler for the form_test_clicked_button() form.
File
- modules/
simpletest/ tests/ form_test.module, line 1841 - Helper module for the form API tests.
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.');
}
}