diff --git a/includes/form.inc b/includes/form.inc
index 1529c19..3404b5a 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -807,6 +807,9 @@ function form_set_error($name = NULL, $message = '', $reset = FALSE) {
   if ($reset) {
     $form = array();
   }
+  if(isset($name) && isset($_POST['form_id'])) {
+    $name = $_POST['form_id'] . "::" . $name; // Scope it based on form_id
+  }  
   if (isset($name) && !isset($form[$name])) {
     $form[$name] = $message;
     if ($message) {
@@ -830,14 +833,24 @@ function form_get_errors() {
  * Return the error message filed against the form with the specified name.
  */
 function form_get_error($element) {
+  if(isset($element['#form_id'])) {
+    $form_id = $element['#form_id']; // Try to make the error form specific
+  } 
   $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];
+    
+  for($i=0;$i<2;$i++) {
+    if($i==0) $key = $element['#parents'][0];
+    else $key = implode('][', $element['#parents']);
+     
+    if(isset($form_id)) {
+      $key0 = "$form_id::$key"; // Provide the scope based on form_id
+      if(isset($form[$key0])) {
+        return $form[$key0];
+      }
+    } 
+    if (isset($form[$key])) {
+      return $form[$key]; // If form_id not found then try without it
+    }
   }
 }
 
@@ -896,6 +909,7 @@ function form_builder($form_id, $form, &$form_state) {
   $count = 0;
   foreach (element_children($form) as $key) {
     $form[$key]['#post'] = $form['#post'];
+    $form[$key]['#form_id'] = $form_id;
     $form[$key]['#programmed'] = $form['#programmed'];
     // Don't squash an existing tree value.
     if (!isset($form[$key]['#tree'])) {
