Issue #1857984 by Ivan Zugec: Fix sample code for hook_field_widget_form so it would...
authorJennifer Hodgdon
Thu, 6 Dec 2012 21:32:14 +0000 (13:32 -0800)
committerJennifer Hodgdon
Thu, 6 Dec 2012 21:32:14 +0000 (13:32 -0800)
modules/field/field.api.php

index 5f64117..90a09fe 100644 (file)
@@ -873,7 +873,7 @@ function hook_field_widget_form(&$form, &$form_state, $field, $instance, $langco
     '#type' => $instance['widget']['type'],
     '#default_value' => isset($items[$delta]) ? $items[$delta] : '',
   );
-  return $element;
+  return array('value' => $element);
 }
 
 /**