' . t('About') . ''; $output .= '

' . t('The Inline Form Errors module provides an experimental approach to form errors, placing the error messages next to the elements themselves. For more information, see the online documentation for the Inline Form Errors module.', [':inline_form_error' => 'https://www.drupal.org/documentation/modules/inline_form_error']) . '

'; return $output; } } /** * Implements hook_preprocess_HOOK() for form element templates. */ function inline_form_errors_preprocess_form_element(&$variables) { _inline_form_errors_set_errors($variables); } /** * Implements hook_preprocess_HOOK() for details element templates. */ function inline_form_errors_preprocess_details(&$variables) { _inline_form_errors_set_errors($variables); } /** * Implements hook_preprocess_HOOK() for fieldset element templates. */ function inline_form_errors_preprocess_fieldset(&$variables) { _inline_form_errors_set_errors($variables); } /** * Implements hook_preprocess_HOOK() for datetime form wrapper templates. */ function inline_form_errors_preprocess_datetime_wrapper(&$variables) { _inline_form_errors_set_errors($variables); } /** * Populates form errors in the template. */ function _inline_form_errors_set_errors(&$variables) { $element = $variables['element']; if (!empty($element['#errors']) && empty($element['#error_no_message'])) { $variables['errors'] = $element['#errors']; } }