As side note, the hook_forms()
purpose is providing the same form builder for a group of forms whose ID follow a schema, such as in the case of comment edit forms, whose IDs are comment_node_[node type]_form. When provided, the form builder callback (passed as callback value) should build the full form, not part of it. The
The fact my_dossier_form()
builds just a submission button, and my_dossier_forms()
is using the same code used by node_forms()
makes me think the code purpose is altering the node edit forms, which should be accomplished by implementing hook_form_BASE_FORM_ID_alter()
. That's what the Book module does with book_form_node_form_alter()
, which is invoked for the node edit form of every content type.