More
See all Show me
1. Drupal node form with one-to-many node references …
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.)

Credits

Like

Tags

  • Super Druper 8 months ago
    Thanks for posting this great demo. Can you please explain how you get the 'add apartment' (Node Reference URL widget) link to display in the view attached to your property node form (is it in the view footer)? And how do you tie-in modalframe to work with the link?
  •  
  • gilcpd 7 months ago
    Hey Benjamin,
    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?
  •  
  • Chris Miller 2 months ago
    I'm interested in the modal frame api integration too. I've looked at node relationships, but it seems to behave in reverse of what I want, and what you have here.
  •  
  • franck 2 months ago
    Great Post.

    How about many to many relationship ... like author/book?
  •  
This conversation is missing your voice. Take five seconds to join Vimeo or log in.

Advertisement

About this video

MP4
00:01:09
  • 1280x800, 5.49MB
  • Uploaded Mon November 30, 2009
  • Please join or log in to download

Statistics

Date Plays Comments
Totals 1,404 1 4
Sep 4th 1 0 0
Sep 3rd 4 0 0
Sep 2nd 10 0 0
Sep 1st 4 0 0
Aug 31st 2 0 0
Aug 30th 3 0 0
Aug 29th 4 0 0