hook_form for multiple content types defined by the same module
- by pao13gate
A new module 'foo' implements foo_node_info() where one or more new content types can be defined.
If foo_node_info() defines two content types, namely a content type 'footypea' and a content type 'footypeb', how does one go about implementing hook_form() (what should the name of the "hook" be?) to configure each node's editing form?
In the drupal example, the name of the new content type is the same as the module name. What happens in the above described example where two new content types are defined by the module?
Should the implemented hook_form() function be of the form: footypea_form() and footypeb_form() ? (this doesn't seem to work)
Or should you implement a single foo_form() function and within this create and return an array $form with elements $form['footypea'] and $form['footypeb'] that are in turn arrays of the individual form field definitions?