0
我已經使用在Drupal 6日起模塊爲我定製module.But在Drupal 7,我收到此錯誤無法使用日期模塊在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模塊中找到它。 請讓我知道如果我失去了一些東西。
感謝 一個
謝謝克萊夫我能看到日期彈出 – 2012-03-07 14:05:02