下拉菜单无显示

时间:2012-07-25 10:11:01

标签: cakephp drop-down-menu

您好我只想显示一个下拉菜单,以选择在我的后台发布文章的时间。所以我在我的表'articles'中创建了一个特殊字段,类型为'time'。我在cakephp框架上工作。这是代码:

<?php $this->Form->create(null, array('enctype' => 'multipart/form-data'))) ?>
<?php echo $this->Form->inputs(array('Article.publication_time'/*, array('label' => 'Time')); ?>
<?php $this->Form->end('Submit') ?>

此代码显示简单的文本输入。你能解释一下为什么吗? 在此先感谢您的帮助!

1 个答案:

答案 0 :(得分:0)

试用此代码

echo $this->Form->input('Article.publication_time', array('type'=>'date',
   'dateFormat' => 'DMY', 
   'minYear' => date('Y') - 70,
   'maxYear' => date('Y') ,
 ));