I want to implement a 1 to N relation of a group of CCK fields into the same Node type

Picture this: I have some projects and some expenses per year I have to define each year and it´s total expenses and provide a short description and some images for each year...

I wanto to make it into the same page... not define two types of content to implement a node referrence where I define the years and it´s corespondent description and images

something like this: enter image description here

I don´t know how can I implement this with Drupal... There is a matrix/array type of CCK field but it doesn´t support the installed CCK it has it´s own stadard types..integer, text etc... so it won´t do ..

Is there any way to obtain this?

the main functionality (ignore the layout ..it can be horizontaly as well)

when I click Add More, ... to add All those fields grouped so I can edit them.... It´s like embeding the other content type into the related NID upon creation of the NID...

Using Drupal 6 and the last CCK available upgrades are not a problem, I can use the latest versions as long they are for D6


I have to explain myself better because what I´ve described I see is not very understandable...

Picture the following requirements (based on a relational database concept) I have a content type named Project Expenses (title, description, project status)

Now I want to describe for each year how much I´ve spent for the project and add a gallery of images with the projects achievements for that particular year.

Now, the common thing would be to add another content type with the following CCK fields (year, amount, image (unlimited multiple values) and a node referrence to the project itself )

The problem I have is at data input.. you have to first create the project...save it then add another node for each year and selecting the project in the node reference dropdown doing the relation between the node and the other (1 to N relationship in therms of a database)

So 2 forms instead of one... 2 saves... This is not cool for the user experience, because normal users don´t know the steps or it results too complicated..(this is a simple example but it can get really complicated with having to fill in a lot of nodes if we have more relations)

Ok, so the solution: embed into one form everything..(multiple pages input would be also a solution) but my ideal would be something like in that image that i gave you

define on the same page the other node as well automaticaly making the relation when saving the main node (the project)

I don´t have any ideea how it´s possible (I could find only one module that does that but the values arren´t in fact CCK fields so can´t use them propperly it´s called matrix field )

Show how is the best way to do this?

  • This question is difficult to respond to. The question is not a question and it is not clear what you are asking for and the ideas threading through the paragraphs are difficult to connect. You may get a better answers if you rewrite it.
    – Ashlar
    Dec 19, 2011 at 16:05
  • 1.)(re:The image) Are you attempting to create a form for the users to provide input? What is the menu path that generated this form for you? 2.)"I want to make it into the same page..."- Do you mean one content type instead of two or more? Why is that important? 3.)"When I click add more.." where are you in Drupal when you click "Add more"? Is this something you want to achieve? 4.)"Using Drupal 6..." If you wish your solution in D6 only use the "6" tag. 5.) The tag "embedding-content" is not clear. Are you referring to CCK fields?
    – Ashlar
    Dec 19, 2011 at 16:15
  • 1.)it´s the node add form(I couldn´t implement it..it´s photoshoped). 2.) yes, one content type only for the input simplicity, user experience, etc 3.) Have you seen the button on the CCK field when you allow multiple values? like images..it has an add more button that adds another value of the CCK ..well this is the same but for a whole related node... 4.) ok 5.) Ok I will explain better...se my re-edit
    – PartySoft
    Jan 31, 2012 at 17:08

1 Answer 1


It appears to me you are needing a compound CCK field type.

If so, take a look at http://poplarware.com/articles/cck_field_module for a rather in depth discussion of how to write your own.

If you don't want to do that, the 3.0 branch of CCK for Drupal 6 apparently has a Multigroup Module. Check out How to add cck custom date field? for discussions about that option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.