summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content_admin.inc9
1 files changed, 6 insertions, 3 deletions
diff --git a/content_admin.inc b/content_admin.inc
index 7e38b8d..fdf1b36 100644
--- a/content_admin.inc
+++ b/content_admin.inc
@@ -272,7 +272,7 @@ function content_admin_field_overview_form($type_name) {
}
$form['disabled']['#value'] = array();
-
+
// Iterate through the dummy form and add top-level fields and weights to a table.
// Construct the table values in an array '#table' that FAPI will ignore, keyed on the item's weight.
// Create separate form elements for each weight and group value and put a placeholder for each in #table.
@@ -927,8 +927,11 @@ function _content_admin_field($type_name, $field_name) {
$function = $module .'_widget';
if (function_exists($function)) {
$node = array(); // TODO are there things we need to add in here ?
- $function('prepare form values', $node, $field, $default_value);
- $form_element = $function('form', $node, $field, $default_value);
+ // Make sure the default value is not a required field.
+ $widget_field = $field;
+ $widget_field['required'] = FALSE;
+ $function('prepare form values', $node, $widget_field, $default_value);
+ $form_element = $function('form', $node, $widget_field, $default_value);
}
else {
// TODO : generate a series of textfields ?