function form_get_error in Drupal 4
Same name and namespace in other branches
- 5 includes/form.inc \form_get_error()
- 6 includes/form.inc \form_get_error()
- 7 includes/form.inc \form_get_error()
Return the error message filed against the form with the specified name.
Related topics
12 calls to form_get_error()
- theme_checkbox in includes/
form.inc - Format a checkbox.
- theme_checkboxes in includes/
form.inc - Format a set of checkboxes.
- theme_date in includes/
form.inc - Format a date selection element.
- theme_file in includes/
form.inc - Format a file upload field.
- theme_password in includes/
form.inc - Format a password field.
File
- includes/
form.inc, line 306
Code
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];
}
}