tags:

views:

21

answers:

1

In a Drupal 6 module, the hook_form function is used to generate a create/edit form. How do I create different forms for create and edit instead of using the same form for both?

+1  A: 

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.

Scott Reynen

related questions