diff --git a/mollom.module b/mollom.module
index 95f9468..776a14a 100644
--- a/mollom.module
+++ b/mollom.module
@@ -2846,7 +2846,6 @@ function node_mollom_form_info($form_id) {
     'moderation callback' => 'node_mollom_form_moderation',
     'elements' => array(),
     'mapping' => array(
-      'post_id' => 'nid',
       'author_name' => 'name',
     ),
   );
@@ -2860,16 +2859,25 @@ function node_mollom_form_info($form_id) {
     $form_info['elements']['title'] = check_plain($type->title_label);
     $form_info['mapping']['post_title'] = 'title';
   }
+  mollom_add_entity_form_info($form_info, 'node', $type->type);
+  return $form_info;
+}
 
-  // Add text fields.
-  $fields = field_info_fields();
-  foreach (field_info_instances('node', $type->type) as $field_name => $field) {
-    if (in_array($fields[$field_name]['type'], array('text', 'text_long', 'text_with_summary'))) {
-      $form_info['elements'][$field_name . '][' . LANGUAGE_NONE . '][0][value'] = check_plain(t($field['label']));
+/**
+ * Adds Mollom form mappings for entities based on entity info (including fields).
+ */
+function mollom_add_entity_form_info(&$form_info, $entity_type, $bundle) {
+  $entity_info = entity_get_info($entity_type);
+  $form_info['mapping']['post_id'] = $entity_info['entity keys']['id'];
+  if (!empty($entity_info['fieldable'])) {
+    // Add text fields.
+    $fields = field_info_fields();
+    foreach (field_info_instances($entity_type, $bundle) as $field_name => $field) {
+      if (in_array($fields[$field_name]['type'], array('text', 'text_long', 'text_with_summary'))) {
+        $form_info['elements'][$field_name . '][' . LANGUAGE_NONE . '][0][value'] = check_plain(t($field['label']));
+      }
     }
   }
-
-  return $form_info;
 }
 
 /**
@@ -2942,18 +2950,17 @@ function comment_mollom_form_info($form_id) {
     'moderation callback' => 'comment_mollom_form_moderation',
     'elements' => array(
       'subject' => t('Subject'),
-      // @todo Update for Field API.
-      'comment_body][und][0][value' => t('Comment'),
     ),
     'mapping' => array(
-      'post_id' => 'cid',
       'post_title' => 'subject',
       'author_name' => 'name',
       'author_mail' => 'mail',
       'author_url' => 'homepage',
     ),
   );
-
+  // Retrieve internal type from $form_id.
+  $comment_bundle = drupal_substr($form_id, 0, -5);
+  mollom_add_entity_form_info($form_info, 'comment', $comment_bundle);
   return $form_info;
 }
 
