问题
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:
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.
来源:https://stackoverflow.com/questions/3424183/drupal-cck-date-field-question