| Versionen | |
|---|---|
| drupal6 – drupal7 | form_get_error($element) |
Return the error message filed against the form with the specified name.
includes/
<?php
function form_get_error($element) {
$form = form_set_error();
$key = $element['#parents'][0];
if (isset($form[$key])) {
return $form[$key];
}
$key = implode('][', $element['#parents']);
if (isset($form[$key])) {
return $form[$key];
}
}
?>
Kommentare
Kommentar hinzufügen