Closed (fixed)
Project:
Date
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
17 Feb 2007 at 11:49 UTC
Updated:
7 Mar 2007 at 12:31 UTC
It took me some time to figure out where a number is added to the fieldset title of a from/to date widget. But I still don't know why this is done. I'm sure there is a very good reason for this, but I don't get it.
This is the code I am referring to (date.module, line 884):
/**
* Theme from/to date combination on form.
*/
function theme_date_form_combination($form) {
$fieldset = array(
'#title' => $form['#title'] . ' '. intval($form['#delta'] + 1),
'#value' => drupal_render($form),
);
$output = theme('fieldset', $fieldset);
return $output;
}
Comments
Comment #1
karens commentedIt's mostly to provide a distinction between multiple date fields with the same label. I just realized the first one doesn't need a number appended, which will keep it from happening on a non-multiple field, so I just committed a fix for that. You can also override this behavior in your theme (theme_date_form_combination($form)).
Comment #2
mphilipp commentedThank you!
Comment #3
(not verified) commented