title: Drupal Nodereference in a custom form
body: <p>I have a custom Drupal FAPI form that supports a fairly complex workflow and I would like to add a Nodereference field to it.  Although I've found people who have included Nodereference fields on custom forms, I have been unable to find any examples of the FAPI declaration for the field (other than this question which uses a text field with the Nodereference AHAH callback: <a href="https://stackoverflow.com/questions/1763720/is-it-possible-to-customise-drupal-node-reference-and-pass-your-search-and-a-argu">Is it possible to customise drupal node reference and pass your search and a argument from another field</a>).</p>
  
  <p>So: what is the best way to add a Nodereference field to a custom form (FAPI)?</p>
  
  <p>Bonus question: is there a simple way to allow for multiple values like CCK supports in a node form?
  <img src="https://content.screencast.com/users/TylerColes/folders/Jing/media/0e689399-fc18-4c28-b719-94200e70c140/nodereference-multivalue.png" alt="Multivalue Nodereference Field in CCK Node"></p>