When I create an image node type, with an fupload field, I get a nice bulk upload form, for creating images. I want to create a gallery node with that form on it, so I could create a gallery and images for it in one step (attached to to the gallery with nodereference). Is that possible out of the box or how do I write the code to do it?

Comments

ddd_’s picture

I want to know that too

grandcat’s picture

If you were using Taxonomy, it would work out of the box: "Free Taging" for creating gallerys.
If you're using nodereference, it won't create automatically a gallery node.

alippai’s picture

My solution is:

  • Create a gallery and an image node type.
  • Add fupload and nodereference field for image.
  • Create a page with two node add forms (gallery and image) on it.
  • Remove the gallery submit&preview buttons.
  • Attach ajaxSubmit to the image save button:
    • the custom path saves the gallery node and returns nid
    • fills the images shared node reference field with the title/nid
    • callback: the original startUploadProcess();
sdk’s picture

Subscribing

sdk’s picture

The Node Reference Create Module could do the job.

from the description:
"This module lets you reference non-existent nodes in an autocomplete nodereference field. The referenced nodes are created when no matching node is selected."

If you set up a gallery and an image node type you can use the noderefcreate module to create the gallery node while uploading the images on the image content type via fupload.

Hope that helps you any further!

Best Regards

sdk