multiple node forms per page, unique $form_id problem

mansspams - November 8, 2009 - 02:51

im new to drupal and run into problem. i have a view that displays several cck nodes. I want to place new node form below each displayed node. Both node_add or drupal_get_form directly in template.php works fine, but all forms has same $form_id of NODETYPE_node_form and validation and submitting does not work as expected.

I gues I need to make empty module (done, turned on) and work some MODULENAME_forms($form_id) magic as explained here http://www.computerminds.co.uk/drupal-6-multiple-instances-same-form-one... or here http://drupal.org/node/336870, but i just simply cannot get it to work. CALLBACK that i set in hook_forms does not seem to influence anything. I suspect these examples are working with custom forms, not node forms. I drilled down form.inc following my form arrays, worked on it for 4 straight days and nothing so far :(

Id like someone smarter direct me the right way with some code samples.

 
 

Drupal is a registered trademark of Dries Buytaert.