Index: imceimage.module
===================================================================
--- imceimage.module	(revision 758)
+++ imceimage.module	(working copy)
@@ -203,13 +203,19 @@
         '#default_value' => $widget['imceimage_file_types'] ? $widget['imceimage_file_types'] : 'png,gif,jpg,jpeg',
         '#required' => TRUE,
       );
+      $form['imceimage_caption'] = array(
+        '#type' => 'checkbox',
+        '#title' => t('Enable caption'),
+        '#default_value' => isset($widget['imceimage_caption']) ? $widget['imceimage_caption'] : 1,
+        '#description' => t('If checked, the user can enter a caption for the image.'),
+      );
       return $form;
 
     case 'validate':
       break;
 
     case 'save':
-      return array('imceimage_file_types');
+      return array('imceimage_file_types', 'imceimage_caption');
 
     case 'callbacks':
       return array(
@@ -516,18 +522,20 @@
     '#default_value' => $element['#value']['imceimage_height'],
   );
 
-  $element['imceimage_alt'] = array(
-    '#type' => 'textarea',
-    '#id' => "imceimagealt-$delta-$field_id",
-    '#default_value' => isset($element['#value']['imceimage_alt']) ? check_plain($element['#value']['imceimage_alt']) : NULL,
-    '#autocomplete_path' => $element['#autocomplete_path'],
-    '#rows' => 1,
-    '#attributes' => array('class' => 'text'),
-    // The following values were set by the content module and need
-    // to be passed down to the nested element.
-    '#title' => t('caption'), //$element['#title']['imceimage_alt'],
-    '#description' => t('The caption text for this image.'), //$element['#description']['imceimage_alt'],
-  );
+  if($field['widget']['imceimage_caption']) {
+    $element['imceimage_alt'] = array(
+      '#type' => 'textarea',
+      '#id' => "imceimagealt-$delta-$field_id",
+      '#default_value' => isset($element['#value']['imceimage_alt']) ? check_plain($element['#value']['imceimage_alt']) : NULL,
+      '#autocomplete_path' => $element['#autocomplete_path'],
+      '#rows' => 1,
+      '#attributes' => array('class' => 'text'),
+      // The following values were set by the content module and need
+      // to be passed down to the nested element.
+      '#title' => t('caption'), //$element['#title']['imceimage_alt'],
+      '#description' => t('The caption text for this image.'), //$element['#description']['imceimage_alt'],
+    );
+  }
 
   $element['imce_view'] = array(
     '#type' => 'item',
