AHAH helper模块
下载地址:http://drupal.org/project/ahah_helper
•功能强大,不需要编写回调函数,不需要编写JS代码。
•注意事项:
•实质上是一个多步表单
•遵守AHAH helper模块给出的编写规范
3级联动的实例代码:
$province_sql = "SELECT * FROM {province} ";
$province_result = db_query(db_rewrite_sql($province_sql));
while($data = db_fetch_object( $province_result)){
$province_options["$data->provinceID"] =$data->province ;
}
$form['profile']['province'] = array(
'#type' => 'select',
'#title' => t('来自省'),
'#options' => $province_options,
'#default_value' => $province_default_value,
'#ahah' => array(
'event' => 'change',
// This is the "magical path". Note that the parameter is an array of
// the parents of the form item of the wrapper div!
'path' => ahah_helper_path(array('profile')),
'wrapper' => 'profile-info-wrapper',
),
);
又有新的Drupal付费视频了^_^
又有新的Drupal付费视频了^_^