function form_get_error

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 form.inc form_get_error($element)
cle7 form.inc form_get_error($element)
elmsmedia7 form.inc form_get_error($element)
icor7 form.inc form_get_error($element)
meedjum_blog7 form.inc form_get_error($element)
mooc7 form.inc form_get_error($element)

Returns the error message filed against the given form element.

Form errors higher up in the form structure override deeper errors as well as errors on the element itself.

Related topics

2 calls to form_get_error()
_form_set_class in includes/form.inc
Sets a form element's class attribute.
_imagefield_focus_focus_min_size_validate in sites/all/modules/ulmus/imagefield_focus/imagefield_focus.module
Element validation function; validate focus_min_size.

File

includes/form.inc, line 1683
Functions for form and batch generation and processing.

Code

function form_get_error($element) {
  $form = form_set_error();
  $parents = array();
  foreach ($element['#parents'] as $parent) {
    $parents[] = $parent;
    $key = implode('][', $parents);
    if (isset($form[$key])) {
      return $form[$key];
    }
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.