Drupal module with different forms for create and edit
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.
精彩评论