
Drupal node form with one-to-many node references to dependent nodes
9 months ago
This short demo shows a node editing UI for nodes (content type "property") in a one-to-many relationship via CCK node reference fields to dependent nodes (content type "apartment").
I start with a property node form with no dependent apartment nodes. I click the Node Reference URL widget link to add a new apartment node, which causes a modal frame to open with a new apartment node form. Because this modal frame is an iframe, it is very sturdy and supports all the expected jQuery behaviors and styles for file field uploads and vertical tabs without any trouble.
When I save the node, the modal frame closes and triggers an AHAH request that updates a Views Attach display in the property node form. The apartment node I just created appears here.
I forgot to publish the new apartment node, so I edit the apartment node, change its publishing options and save the node form. When the modal frame closes, the embedded view is updated again to show that the apartment node has been published.
Modules used:
Modal Frame API drupal.org/project/modalframe
Node Reference URL widget drupal.org/project/nodereference_url
Views Attach drupal.org/project/views_attach
The theme is Slate, part of Admin module. drupal.org/project/admin
(I have not mastered the magic of screencasts. This is my first try.)
I start with a property node form with no dependent apartment nodes. I click the Node Reference URL widget link to add a new apartment node, which causes a modal frame to open with a new apartment node form. Because this modal frame is an iframe, it is very sturdy and supports all the expected jQuery behaviors and styles for file field uploads and vertical tabs without any trouble.
When I save the node, the modal frame closes and triggers an AHAH request that updates a Views Attach display in the property node form. The apartment node I just created appears here.
I forgot to publish the new apartment node, so I edit the apartment node, change its publishing options and save the node form. When the modal frame closes, the embedded view is updated again to show that the apartment node has been published.
Modules used:
Modal Frame API drupal.org/project/modalframe
Node Reference URL widget drupal.org/project/nodereference_url
Views Attach drupal.org/project/views_attach
The theme is Slate, part of Admin module. drupal.org/project/admin
(I have not mastered the magic of screencasts. This is my first try.)
-
Vimeo: About / Blog / Developers / Jobs / Community Guidelines / Community Forums / Help Center / Site Map / Merchandise
/ Get Vimeo

Prev week
I've been trying to do this amazing modal usage but no success. Could you create a video showing how to do this? A screen cast on how to integrate Modal Frame API to edit child Forms?
How about many to many relationship ... like author/book?