In the same way that I can create a text field using CCK and then configure this text field to have multiple values. Does anyone know if/how it would be possible to apply the same logic to groups of fields in CCK?

For instance I want to create a group of 3 text fields: Name, Intro, Description

I want to then make it possible so that multiple names, intros and descriptions can be added on the relevant 'create content' page.

Any thoughts? This stems from this discussion: http://drupal.org/node/230464

Thanks,

Comments

CCK comes with the fieldgroup module, if you enable that one the modules page you can then add groups to content types and then add fields to those groups.

Actually, those groups can't be "multiple", and that's what baronmunchowsen is asking for. ;)

Thanks for the responses.

Any idea how those groups of fields could become multiple?

I’ve just noticed that http://drupal.org/project/cck_fullname says:

This provides a prefix, first, middle, last, and suffix field as a single CCK field. my emphasis

Could this be a way to group fields together, by using a module?
___________________
It’s in the detaιls…

___________________
It’s in the detaιls…

That's what I did a few months ago when I got the same answer as here... I needed an "Professional Experience" fieldgroup, composed of a title, a customer name, start and end dates, and a rich description, to be multiple inside a "Resume" node.
As nothing provided this feature (I heard CCK will allow this when released for Drupal 6...), I was obliged to develop my own "all-in-one" CCK Field.

David

Thanks for these responses - it is very much appreciated. I will also check into Drupal 6's CCK functionality.

Hi, sto,

This is very much the same sort of thing I need. But I'm fairly new to Drupal. Is there any chance you'd be willing to share your "all-in-one" CCK Field example with me? I promise not to pester you with questions.

I imagine a lot of people need this, and would be grateful for an example.

Ginger

I'll be trying to implement this in a few weeks - and I'll happily post back any findings and that sort of thing

how do you implement this "all in one" cck field group in D6?

An alternative approach, for the part where you want multiple fields as a group create a new content type with those fields, lets call it typeA. Before the next step add the 'Addnode' module, Now in the "main" type add a node reference field and use the 'Add Node List' widget type. Just a thought

The addnode module is certainly something I will look at. Though I would rather not create a surplus of nodes in the system, this seems to be a very useful tool.

subscribing

--
Anders Hal

subscribing

Subscribing

me too :)

This seems to be a pretty common & necessary use case, and I'm pretty surprised Drupal doesn't (at least easily) support it. I'm working on this issue for my site and will post if I find a solution.

i'm up against a brick wall with this one as well...

how do you implement a form where the user can enter multiple domains , or multiple previous jobs, or multiple places he/she visited?

its just a text field, with an "add new entry" icon or link... giving the user the ability to add multiple "lines" to a form dynamically... prior to submitting.

not to worry. figured it out...
in D6 , you need to set the number of values on your cck field to "unlimited".

that'll trigger an Ahah "add more" button on your form.

I have submitted a feature request for this on the fieldgroup module within CCK:

http://drupal.org/node/271226

I think I'm going to implement a custom CCK type to get mine working right now, but it makes sense to be able to create a group of fields and then allow for multiple values of that group. Should be fairly easy to code as well.

Oh, here's a howto on how to create your own CCK type field.

http://www.darcynorman.net/2008/05/02/creating-a-custom-compound-field-f...

Cheers

---
Open Source Web Programming

Unfortunately, that example is only for D5 -- I can't figure out what I need to do to get it up and running in D6 either. There is an article about Drupal 5.x to 6.x FormAPI changes (http://drupal.org/node/144132) but I couldn't figure out what all needed to be updated.

subscribing

Subscribing

subscribing

Subscribing.

Subscribing

So many subscribers, so little answers...

I guess you will be happy to see this: http://drupal.org/project/flexifield. Flexifield is "still in early development", so coders, testers, developers and other smart people out there, give the developer a hand if you can.

Another intresting module is this one: http://drupal.org/project/education_field. It's not nearly as flexible as the flexifield solution, but it might be just what you need, or at least it can serve as a starting point for your own custom solution.

Thanks so much for posting these links.

I have downloaded and tried out the flexifield mod (http://drupal.org/project/flexifield), and in the 15 minutes I had to play with it, saw real potential here as being the solution of the problem outlined in this thread. It effectively leverages the fields of other content types that you create, allowing you to 'embed' content types within one another, and create multiple values of those content type's fields, though without the overhead of creating surplus nodes.

I will be following the development of that module with a keen interest (and pitching in wherever I can) and I would urge others who have subscribed to this post to take a look too.

A good explanation of the mod can be found in this comment: http://drupal.org/node/292059#comment-955449.

subscribing

Cheers

Gaurav Kumar
Blisstering Solutions
http://www.blisstering.com

subscribing

subscribing

A lot of work has been done in the past couple of weeks in this issue: http://drupal.org/node/119102.

Yet another subscriber ;-)

Subscribing

ditto

Subscribing. This feature is much needed for many things.

subscribing

subscribing

thanks

thanks too

V

V

sub

A real message between all subscriptions: marcus_petrux tells us that the CCK multigroup module is believed to be almost ready. I quote:

Please, test and report back any issues that you may find. This will help the CCK maintainers evaluate it all, and maybe we can count on it for a future CCK release.

So this is the moment to stop being subscribed and start testing. Thanks for contributing!

Subscribe

^^^^^

So this is the moment to stop being subscribed and start testing.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

subscribing

Sorry if this solutions has already be mentioned. But I came across this site http://www.poplarware.com/cckfieldmodule.html There will probably be a decent solution in Drupal 7. But for now working with a a node reference will be sufficient.

Subscribing

Subscribing, I had same question here: http://drupal.org/node/562502

subscribing to what? As per the comment above, this module is now part of cck v3.

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

Is CCK V3 Stable yet? Where can it be downloaded and how do I add the option of having multiple groups?

Here we are almost a year later and no CCK v3?

Subscribing
My requirement is also the same for Drupal 5.16

Gaurav Arya

also I need to put taxonomy auto complete fields under every group.
Any thoughts?

Gaurav Arya

first thought is that should be a new thread, lol.

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

I wouldn't count on this for Drupal 5, especially now that Drupal 7 is appearing on the horizon.

I have to agree with marc-- more than likely this isn't going to happen on d5. Besides the fact that d7 is around the corner, there were significant changes to cck between d5 and d6-- i'm not sure it's even possible.

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

This seems to be a possible solution:

http://drupal.org/project/relativity

The example that's used in the documentation is a CD with multiple tracks.

Add a new group of values with a AddNewGroup button would certainly be sweeeet; in my case the user should be able to add multiple work experiences...

subscribing

For those who want multiple fieldgroups I can absolutely recommend CCK 6.x-3.x-dev (http://drupal.org/node/484068). I just thoroughly tested fieldgroups with textfields, textareas and imagefields inside an unlimmited fieldgroup.

You have just ended 10 days of searching for the solution!

Thank you very much.

works like a charm, thanks for the heads up!!

Front-taal - Full Service Communication - www.fronttaal.nl

I need too ...

MyBlog: http://nan.im/

FYI, to follow this functionality for d7 see http://drupal.org/project/field_collection.

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

CCK Groupfield would be perfect if it just had a 'number of values' setting, just like all other field types?? this would solve everything... is it that difficult to implement? (i'm not a developer btw otherwise i'd do it :P)

I know it's been a while. Is there any way to have several instances of a fieldgroup within a node?

As said, check http://drupal.org/project/field_collection. If that doesn't help, ask more specific questions.

Is there any solution? This feature is very necessary.

Cheers,
I Wayan Wirka
duststone.com

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

Field Collection is an overkill. All I want to have some field groups that can be multiplied with an 'Add more' button, like any field that can have unlimited values.

I don't want to create an entity for all field groups that I want to have in a node. This an overkill an it is not a good practice. Beside that it is incompatible with almost all modules, it is very hard to theme.

What I mean with incompatibility, you need to do a lot of unnecessary things to get the job done. Simplest example would be views, if you want to have the fields inside the field collection, you should add a relationship, which makes the query necessarily bigger. Another example would be the revisions that doesn't respect the fields inside the field collections since they are another entity! The examples can be listed pages long.

In short, field collection sucks as a solution to group a few fields together. The module itself can be useful in some cases, but it is not a valid solution for this problem! Drupal MUST have a better solution for such a simple need.

All I want to have some field groups that can be multiplied with an 'Add more' button, like any field that can have unlimited values.

You make it sound like it's a matter of a couple of lines of code. As demonstrated by the various efforts to implement this functionality (ie see any of the cck v3 issues)-- it's not. field_collection is one attempt. Any attempt will add complexity and enlarge the query. A relationship is a join -- nothing more. There's no way to relate things (ie fields to fields or fields to nodes) without joins (the 'R' in RDBMS) unless you do it in a completely non-standard and hardcoded way.

Just because something is a 'simple need' doesn't mean it's a simple task. And I'm not sure who you're addressing when you say 'Drupal must...'. 'Drupal' is the community... including you. field_collection was created and submitted by someone who needed the functionality and was kind enough to make it available via drupal.org for free.

However, ymmv... feel free to prove me wrong and create the functionality you need with a method you approve of and submit to drupal.org.

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

I am not trying to address someone, what I was trying to address is the fact of a problem/need that must have another simpler solution other than creating entities for every collection of fields. I find the module field collection itself also very useful in many cases and respect the contributers, as well all the Drupal community (including myself). All I wanted to state is in some cases that we need simply a few fields that can be tied together without creating another entity, the field collection is an overkill and makes the things unnecessarily complicated.

I thought this is a general discussion page, and I throw my two cents to keep people from trying to close the discussion by giving a link to field collection module.

There are (at least) two approaches to solve this problem. All software that intends to both be flexible and user friendly (such as the Field Collection module), will have add some overhead compared to solutions that are developer-centered and/or targeted at a single use case (eg. a custom compound field as described in http://www.phase2technology.com/blog/compound-fields-in-drupal-7).

I don't think it's fair to say that Field Collection is "overkill". It's just a different approach and it's up to the site builder to choose. IMHO, the fact that both approaches can exist side-by-side illustrates the strength of Drupal.

Field collection Module solve this requirement.