I need to create a custom form and add an entity reference field to it. The field uses autocomplete with a view for entity selection. The field already exists on a node but i also need it in a custom module. Is there a way to add this field in a custom module with MYMODULE_MYFORM_form()
?
Tell me more
×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.
If you are using the references module's node_reference field, then, in your custom form, you'll want to create a field that uses the node_reference's autocomplete, like so:
See node_reference.module line 892 for more details on parameters, etc. |
|||
|