简体   繁体   English

drupal cck日期字段问题

[英]drupal cck date field question

I've added CCK Date field to my node type using the Textfield with Date Popup wiget. 我已使用带有日期弹出框的文本字段将CCK日期字段添加到我的节点类型中。 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. 我看不到如何通过form_alter挂钩来完成此操作,因为我的日期字段未出现在$ form值中。

Thanks Steve 谢谢史蒂夫

In your database, set your custom module's "weight" in the system table to be higher than that of CCK. 在数据库中,将系统表中自定义模块的“权重”设置为高于CCK。 If it is not, the field is not on the form when your hook_form_alter gets to it. 如果不是,则在hook_form_alter到达表单时,该字段不在表单上。

Once you do that, you shouldn't have any problem customizing the form. 一旦这样做,自定义表格就不会有任何问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM