您的位置:首页 > 其它

drupal7 如何将一个date字段添加上日期插件效果

2014-07-14 10:35 381 查看
//这里以created字段为例子
function    Hook_form_alter($form,$form_state,$form_id){
$form['created']['#type'] = 'date_popup';
$form['created']['#date_format'] = 'Y-m-d';
$form['created']['#size'] = 20;
$form['created']['#attributes']['readonly'] = true;
$form['created']['#date_label_position'] = 'within';
}


                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: