tags:

views:

119

answers:

1

Hi,

I've added CCK Date field to my node type using the Textfield with Date Popup wiget. The granularity is set to include Hours and Minutes. The display show two textareas, one for the date and the other for time.

How do I override the time field to be a drop down? I can't see how I can do this via form_alter hook as my date field does not appear in the $form value.

Thanks Steve

+1  A: 

In your database, set your custom module's "weight" in the system table to be higher than that of CCK. If it is not, the field is not on the form when your hook_form_alter gets to it.

Once you do that, you shouldn't have any problem customizing the form.

Chris Ridenour
Cheers Chris, this looks promising. Managed to see the field I created but it look different from the other form elements in that no #type or #default_value was specified. Not sure if that's specific to Date CCK fields but will investigate further.
Steven Cheng

related questions