How to add and relate a node within the parent nodes add form in Drupal.
Posted
by
Espen Christensen
on Stack Overflow
See other posts from Stack Overflow
or by Espen Christensen
Published on 2008-12-15T17:57:00Z
Indexed on
2011/01/11
19:54 UTC
Read the original article
Hit count: 380
Hi,
I want to accomplish the following scenario in Drupal:
You have 2 content-types. Lets say, an application-form for a lisence, and a content-type for persons.
Then when you go to add a lisence in the "node/add" submission form in Drupal, i would like to add a relative number of persons that would be related to this lisence, and only this lisence. Say you would like to apply for a lisence, and relate 4 persons to this lisence, then insted of creating the lisence and then create the 4 persons and relate them to the lisence, i would like to do this "inline".
So when i add a lisence, there would be a way to add 1 or more persons that would relate to the lisence node. Is this possible, and if so how?
I have been looking at the node reference module, and that manages to reference a node to another, but not to add them inline with the other.
With the web-development framework Django, there is a way to this with something called "inline-editing", where you get the content-type fields inside another content-type creation form. There you bind them togheter with a ForeignKey.
Anybody know of something simular in Drupal, if not, is it another way to achive something simular, that would be as user-friendly?
© Stack Overflow or respective owner