I've recently upgraded to the latest dev, and now my date label is missing. It should say "Date" above the date field. I've checked all my setting numerous times. I've even tried to rename it and tried different date widgets. I've had no success. In the mean time I just put the actual date field and time field (textbox) in a group so users wouldn't get too confused.

CommentFileSizeAuthor
#6 date_label.patch611 bytesfreakalis
missing_date_label.GIF7.24 KBMedicSean37

Comments

karens’s picture

Status: Active » Postponed (maintainer needs more info)

There is a new release out today for both Date and Calendar. Please upgrade to it and see if you still have problems. If so, I need to see an export of your date field to do anything more (use Content Copy to export the field information).

shabam’s picture

I'm also having the same problem. I am running RC6. I found that it is only dates with repeat turned on that do not display labels. Here are two dates. The only difference between the two is I changed the widget type.

This one works:

$content[type]  = array (
  'name' => 'Contest',
  'type' => 'contest',
  'description' => 'Please enter the contest information.  All contest must be free of spam advertising to the entrants.',
  'title_label' => 'Title',
  'body_label' => 'Description',
  'min_word_count' => '0',
  'help' => '',
  'node_options' => 
  array (
    'status' => false,
    'promote' => false,
    'sticky' => false,
    'revision' => false,
  ),
  'pingback' => '1',
  'scheduler' => 1,
  'scheduler_touch' => 0,
  'old_type' => 'contest',
  'orig_type' => '',
  'module' => 'node',
  'custom' => '1',
  'modified' => '1',
  'locked' => '0',
  'comment' => '2',
  'comment_default_mode' => '4',
  'comment_default_order' => '1',
  'comment_default_per_page' => '50',
  'comment_controls' => '3',
  'comment_anonymous' => '2',
  'comment_subject_field' => '1',
  'comment_preview' => '0',
  'comment_form_location' => '1',
);
$content[fields]  = array (
  0 => 
  array (
    'label' => 'test',
    'field_name' => 'field_test',
    'type' => 'date',
    'widget_type' => 'date_popup',
    'change' => 'Change basic information',
    'weight' => '3',
    'default_value' => 'blank',
    'default_value_code' => '',
    'default_value2' => 'same',
    'default_value_code2' => '',
    'input_format' => 'm/d/Y',
    'input_format_custom' => '',
    'year_range' => '-3:+3',
    'increment' => '1',
    'advanced' => 
    array (
      'label_position' => 'above',
      'text_parts' => 
      array (
        'year' => 0,
        'month' => 0,
        'day' => 0,
        'hour' => 0,
        'minute' => 0,
        'second' => 0,
      ),
    ),
    'label_position' => 'above',
    'text_parts' => 
    array (
    ),
    'description' => '',
    'required' => 0,
    'multiple' => '1',
    'repeat' => 0,
    'todate' => '',
    'granularity' => 
    array (
      'year' => 'year',
      'month' => 'month',
      'day' => 'day',
    ),
    'output_format_date' => 'm/d/Y',
    'output_format_custom' => '',
    'output_format_date_long' => 'm/d/Y',
    'output_format_custom_long' => '',
    'output_format_date_medium' => 'm/d/Y',
    'output_format_custom_medium' => '',
    'output_format_date_short' => 'm/d/Y',
    'output_format_custom_short' => '',
    'tz_handling' => 'none',
    'timezone_db' => '',
    'op' => 'Save field settings',
    'module' => 'date',
    'widget_module' => 'date',
    'columns' => 
    array (
      'value' => 
      array (
        'type' => 'varchar',
        'length' => 20,
        'not null' => false,
        'sortable' => true,
      ),
    ),
    'display_settings' => 
    array (
      'label' => 
      array (
        'format' => 'above',
        'exclude' => 0,
      ),
      'teaser' => 
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
      'full' => 
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
      4 => 
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
      2 => 
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
      3 => 
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
      'token' => 
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
    ),
  ),
);
$content[extra]  = array (
  'title' => '-5',
  'body_field' => '1',
  'menu' => '-1',
  'taxonomy' => '-2',
);

Then I took the same field and changed the widget type to include a repeat option and the label goes away.

$content[type]  = array (
  'name' => 'Contest',
  'type' => 'contest',
  'description' => 'Please enter the contest information.  All contest must be free of spam advertising to the entrants.',
  'title_label' => 'Title',
  'body_label' => 'Description',
  'min_word_count' => '0',
  'help' => '',
  'node_options' => 
  array (
    'status' => false,
    'promote' => false,
    'sticky' => false,
    'revision' => false,
  ),
  'pingback' => '1',
  'scheduler' => 1,
  'scheduler_touch' => 0,
  'old_type' => 'contest',
  'orig_type' => '',
  'module' => 'node',
  'custom' => '1',
  'modified' => '1',
  'locked' => '0',
  'comment' => '2',
  'comment_default_mode' => '4',
  'comment_default_order' => '1',
  'comment_default_per_page' => '50',
  'comment_controls' => '3',
  'comment_anonymous' => '2',
  'comment_subject_field' => '1',
  'comment_preview' => '0',
  'comment_form_location' => '1',
);
$content[fields]  = array (
  0 => 
  array (
    'label' => 'test',
    'field_name' => 'field_test',
    'type' => 'date',
    'widget_type' => 'date_popup_repeat',
    'change' => 'Change basic information',
    'weight' => '3',
    'default_value' => 'blank',
    'default_value_code' => '',
    'default_value2' => 'same',
    'default_value_code2' => '',
    'input_format' => 'Y-m-d H:i:s',
    'input_format_custom' => '',
    'year_range' => '-3:+3',
    'increment' => '1',
    'advanced' => 
    array (
      'label_position' => 'above',
      'text_parts' => 
      array (
        'year' => 0,
        'month' => 0,
        'day' => 0,
        'hour' => 0,
        'minute' => 0,
        'second' => 0,
      ),
    ),
    'label_position' => 'above',
    'text_parts' => 
    array (
    ),
    'description' => '',
    'required' => 0,
    'multiple' => 1,
    'repeat' => 1,
    'todate' => '',
    'granularity' => 
    array (
      'year' => 'year',
      'month' => 'month',
      'day' => 'day',
    ),
    'output_format_date' => 'm/d/Y',
    'output_format_custom' => '',
    'output_format_date_long' => 'm/d/Y',
    'output_format_custom_long' => '',
    'output_format_date_medium' => 'm/d/Y',
    'output_format_custom_medium' => '',
    'output_format_date_short' => 'm/d/Y',
    'output_format_custom_short' => '',
    'tz_handling' => 'none',
    'timezone_db' => '',
    'repeat_collapsed' => '0',
    'op' => 'Save field settings',
    'module' => 'date',
    'widget_module' => 'date',
    'columns' => 
    array (
      'value' => 
      array (
        'type' => 'varchar',
        'length' => 20,
        'not null' => false,
        'sortable' => true,
      ),
      'rrule' => 
      array (
        'type' => 'text',
        'not null' => false,
        'sortable' => false,
      ),
    ),
    'display_settings' => 
    array (
      'label' => 
      array (
        'format' => 'above',
        'exclude' => 0,
      ),
      'teaser' => 
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
      'full' => 
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
      4 => 
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
      2 => 
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
      3 => 
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
      'token' => 
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
    ),
  ),
);
$content[extra]  = array (
  'title' => '-5',
  'body_field' => '1',
  'menu' => '-1',
  'taxonomy' => '-2',
);
karens’s picture

Status: Postponed (maintainer needs more info) » Fixed

I can't replicate this in the latest code, assuming fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

freakalis’s picture

I have also have noticed the disappearing label.

Tracked it down to date_elements.inc, row 286 (latest dev).

    '#title'         => !$field['multiple'] ? t($field['widget']['label']) : '',

Why arent there no label if it's multiple? I still need the label even if it's a repeat.

    '#title'         => t($field['widget']['label']) ,
freakalis’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new611 bytes

Here is a patch

karens’s picture

Status: Needs review » Fixed

That bit of code is because multiple value dates are displayed in a fieldset and the label goes on the fieldset rather than being repeated for each date. But repeating dates need different treatment so I need to change the original code to do this only for multiples that are not repeats.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.