Drupal Nodereference in Custom Form

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? Multivalue Nodereference Field in CCK Node

+4
source share
2 answers

Start learning haha ​​here: 'add another element' in Drupal formats other than CCK

Someone who will try to investigate this: http://drupal.org/node/266584#comment-870376

+2
source

You can go to the article: Adding Dynamic Form Elements Using AHAH http://drupal.org/node/331941

0
source

Source: https://habr.com/ru/post/1306166/


All Articles