【发布时间】:2012-03-06 16:48:06
【问题描述】:
我使用 Drupal 6 中的日期模块作为我的自定义模块。但在 Drupal 7 中,我收到此错误
Fatal error: Call to undefined function date_popup_load() in C:\xampp\htdocs\widgetcorp\sites\all\modules\freeway\freeway.admin.inc on line 164
这是iam使用它的形式如下。
function create_freeway_project (){
$node = node_load(arg(1));
$form = array();
date_popup_load();
$form['title'] = array(
'#type' => 'textfield',
'#title' => t('Project Description'),
'#size' => 60,
'#maxlength' => 128,
'#required' => TRUE,
);
$form['custRef'] = array(
'#type' => 'textfield',
'#title' => t('Customer Reference'),
'#size' => 60,
'#maxlength' => 128,
'#required' => TRUE,
);
$form['poRef'] = array(
'#type' => 'textfield',
'#title' => t('PO Reference'),
'#size' => 60,
'#maxlength' => 128,
'#required' => TRUE,
);
$form['splinst'] = array(
'#type' => 'textarea',
'#title' => t('Special Instructions'),
'#size' => 60,
'#maxlength' => 128,
'#required' => TRUE,
);
$form['strtdate'] = array(
'#type' => 'date_popup',
'#title' => t('Delivery Date'),
'#size' => 60,
'#maxlength' => 128,
'#required' => TRUE,
);
$form['enddate'] = array(
'#type' => 'date_popup',
'#title' => t('End Date'),
'#size' => 60,
'#maxlength' => 128,
'#required' => TRUE,
);
$form['create_project_btn'] = array(
'#type' => 'submit',
'#value' => 'Create Freeway Project',
);
return $form;
}
是否要添加 Jquery_UI 模块?我没有在 Drupal 7 的 Date 模块中找到它。 如果我遗漏了什么,请告诉我。
谢谢 一个
【问题讨论】:
标签: date drupal-7 drupal-modules