I have a special form of Drupal FAPI that supports a rather complex workflow, and I would like to add a Nodereference field to it. Although I found people who included Nodereference fields in custom forms, I could not find examples of FAPI declarations for this field (other than this question, which uses a text field with a Nodereference callback AHAH: Is it possible to configure the drupal node link and pass your search and argument from another field ).
So: what is the best way to add a Nodereference field to a custom form (FAPI)?
Bonus question: is there an easy way to allow multiple values, such as CCK support in the form of a node? 
source share