--- jquery_colorpicker.module	2011-02-17 20:49:30.290162189 +0100
+++ jquery_colorpicker.module.new	2011-02-17 20:49:30.320162189 +0100
@@ -71,12 +71,12 @@ function jquery_colorpicker_theme()
 function theme_jquery_colorpicker($variables)
 {
 	$element = $variables['element'];
-	
+
 	$class = array('form-colorpicker');
 	$output = '';
 
 	$path = drupal_get_path('module', 'jquery_colorpicker') . '/';
-	
+
 	// Decide what background to use to render the element. In order to ensure the background exists, we create an array of
 	// the two possibilities, that we will use to compare the value submitted in the Form API definition
 	$backgrounds = array('select.png', 'select2.png');
@@ -94,12 +94,12 @@ function theme_jquery_colorpicker($varia
 		$default_color = '#' . strtolower($element['#default_value']);
 	}
 	else
-	{	
+	{
 		$default_color =  "#ffffff";
 	}
 	// Build an array of all the settings to be used by the javascript function
 	$settings = array('ids' => array($element['#id']), 'backgrounds' => array($background_url), 'backgroundColors' => array($default_color), $element['#id'] . '-defaultColor' => $default_color);
-	
+
 	// Attach the 3rd party CSS and JS files, and attach the module's JS files.
 	$element['#attached'] = array
 	(
@@ -144,7 +144,7 @@ function theme_jquery_colorpicker($varia
 			'data' => $js,
 			'type' => 'inline',
 		);
-	}	
+	}
 
 	// And we pass the settings in a namespace to the Javascript
 	drupal_add_js(array('jqueryColorpicker' => $settings), 'setting');
@@ -299,12 +299,12 @@ function jquery_colorpicker_field_format
 		'jquery_colorpicker_color_display' => array
 		(
 			'label' => t('Colored block'),
-			'field_types' => array('jquery_colorpicker'),
+			'field types' => array('jquery_colorpicker'),
 		),
 		'jquery_colorpicker_text_display' => array
 		(
 			'label' => t('Text'),
-			'field_types' => array('jquery_colorpicker'),
+			'field types' => array('jquery_colorpicker'),
 		),
 	);
 }
@@ -354,7 +354,10 @@ function jquery_colorpicker_field_widget
  */
 function jquery_colorpicker_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element)
 {
-	$value = (isset($items[$delta]['jquery_colorpicker'])) ? $items[$delta]['jquery_colorpicker'] : '';
+  $value = '';
+  if (isset($instance['default_value'][$delta]['jquery_colorpicker'])) $value = $instance['default_value'][$delta]['jquery_colorpicker'];
+  if (isset($items[$delta]['jquery_colorpicker'])) $value = $items[$delta]['jquery_colorpicker'];
+
 	$element += array
 	(
 		'#delta' => $delta,
@@ -364,7 +367,7 @@ function jquery_colorpicker_field_widget
 	{
 		$element['jquery_colorpicker'] += array
 		(
-			'#title' => t('Color'),
+			'#title' => $instance['label'],
 			'#type' => 'jquery_colorpicker',
 			'#default_value' => $value,
 		);
