You are here

function theme_date_form_fieldgroup in Date 5

Theme entire date field form.

Display the first item and any other non-empty items, then groups others into an 'additional' theme.

File

./date.module, line 654
Defines a date/time field type.

Code

function theme_date_form_fieldgroup($form) {
  foreach ($form as $delta => $item) {
    if ((!$item['#empty'] || $item['#delta'] == 0) && is_numeric($delta)) {
      $output .= drupal_render($form[$delta]);
    }
    elseif (is_numeric($delta)) {
      $additional .= drupal_render($form[$delta]);
      $title = $form['#title'];
    }
  }
  $output .= theme('date_form_empty', $additional, $title);
  $output .= drupal_render($form);
  return $output;
}