diff --git includes/form.inc includes/form.inc index e0bc9cb..1bc8434 100644 --- includes/form.inc +++ includes/form.inc @@ -1611,9 +1611,13 @@ function form_get_error($element) { * Flag an element as having an error. */ function form_error(&$element, $message = '') { - form_set_error(implode('][', $element['#parents']), $message); + $id = $element['#id']; + $element['#prefix'] = "$message"; + $link = l($message,current_path(), array("fragment" => "$id-error", 'absolute'=> TRUE, 'html'=>TRUE,)); + form_set_error(implode('][', $element['#parents']), $link); } + /** * Walk through the structured form array, adding any required properties to * each element and mapping the incoming input data to the proper elements.