Index: views_plugin_node_fullcalendar.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/fullcalendar/views_plugin_node_fullcalendar.inc,v
retrieving revision 1.5.2.5
diff -u -p -r1.5.2.5 views_plugin_node_fullcalendar.inc
--- views_plugin_node_fullcalendar.inc	9 Feb 2011 16:10:06 -0000	1.5.2.5
+++ views_plugin_node_fullcalendar.inc	10 Feb 2011 12:27:47 -0000
@@ -85,6 +85,29 @@ class views_plugin_node_fullcalendar ext
       '#process' => array('form_process_select', 'ctools_dependent_process'),
       '#dependency' => array('edit-row-options-custom-fc-date' => array(1)),
     );
+
+    // Disable form elements when not needed.
+    if (empty($field_options)) {
+      $form['custom']['#description'] = t('All the options are hidden, you need to add fields first.');
+      $form['custom']['fc_title']['#type'] = 'hidden';
+      $form['custom']['fc_title']['#disabled'] = TRUE;
+      $form['custom']['fc_title_field']['#type'] = 'hidden';
+      $form['custom']['fc_title_field']['#disabled'] = TRUE;
+      $form['custom']['fc_url']['#type'] = 'hidden';
+      $form['custom']['fc_url']['#disabled'] = TRUE;
+      $form['custom']['fc_url_field']['#type'] = 'hidden';
+      $form['custom']['fc_url_field']['#disabled'] = TRUE;
+      $form['custom']['fc_date']['#type'] = 'hidden';
+      $form['custom']['fc_date']['#disabled'] = TRUE;
+      $form['custom']['fc_date_field']['#type'] = 'hidden';
+      $form['custom']['fc_date_field']['#disabled'] = TRUE;
+    }
+    if (empty($date_fields)) {
+      $form['custom']['fc_date']['#type'] = 'hidden';
+      $form['custom']['fc_date']['#disabled'] = TRUE;
+      $form['custom']['fc_date_field']['#type'] = 'hidden';
+      $form['custom']['fc_date_field']['#disabled'] = TRUE;
+    }
   }
 
   function render($row) {
