drupal 的 普通form,与node 中的form 的函数区别

来源:互联网 发布:篮球护具 知乎 编辑:程序博客网 时间:2024/06/07 02:59
一般的form在菜单钩子搞定后,就要用pagecallback函数比如模块名字叫page_examplefunction page_example_test() //page_example_test是回调函数名字{ return drupal_get_form('page_example_FormTest');}function page_example_FormTest($form_state){//加入自己的form element}//必须用page_example_FormTest,因为page_example_FormTest就是form的名字了function page_example_FormTest_validate($form, &$form_state){}
原创粉丝点击