diff --git a/includes/form.inc b/includes/form.inc
index 5754bc541a4d4d07dc31a5a01ce84756879c2b27..d09676a3c56acfd96569f456a051bc13a0b6719c 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -79,7 +79,7 @@ function drupal_get_form($form_id, &$form, $callback = NULL) {
     }
   }
   if (isset($form_id)) {
-    $form['form_id'] = array('#type' => 'hidden', '#value' => $form_id);
+    $form['form_id'] = array('#type' => 'hidden', '#value' => $form_id, '#id' => str_replace('_', '-', "edit-$form_id"));
   }
   if (!isset($form['#id'])) {
     $form['#id'] = $form_id;