I'm grappling with learning drupal and have made a custom node type of my own.

I now want to create a custom form for that node so that I can specify a relation between this node and another.

How can I go about creating another form for this module into which the user can put the other node name or select from a drop down list?

Basically, can you define futher forms and update actions past the CRUD ones with drupal, or are you stuck with the add/update form?
Cheers

Comments

styro’s picture

half_brick’s picture

My issue is not so much with the building of the form, but where to define the form within the module?
If I create a function to build the form, how will drupal know where to find it and to execute it?
thanks

styro’s picture

http://api.drupal.org/api/4.7/group/hooks

Modules are basically just a series of hook functions that get triggered by Drupal for various events.

eg for your own node type:
http://api.drupal.org/api/4.7/function/hook_form

or for adding your own stuff to other node types:
http://api.drupal.org/api/4.7/function/hook_nodeapi

--
Anton
New to Drupal? | Forum posting tips | Troubleshooting FAQ
Example Knowledge Base built using Drupal