开发者

Drupal module with different forms for create and edit

开发者 https://www.devze.com 2022-12-30 21:28 出处:网络
In a Drupal 6 module, the hook_form function is used to generate a create/edit form. How do I create different form开发者_开发技巧s for create and edit instead of using the same form for both?The firs

In a Drupal 6 module, the hook_form function is used to generate a create/edit form. How do I create different form开发者_开发技巧s for create and edit instead of using the same form for both?


The first parameter to hook_form is $node. If $node->nid is set, it's an already-saved node, so an edit form. If not, it's a create form.

0

精彩评论

暂无评论...
验证码 换一张
取 消