CCK Multiple Groups (like multiple fields)

baronmunchowsen - March 10, 2008 - 03:27

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,

CCK comes with the fieldgroup module

nevets - March 10, 2008 - 04:37

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

sto - March 10, 2008 - 09:07

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

Thanks for the responses.

baronmunchowsen - March 11, 2008 - 06:45

Thanks for the responses.

Any idea how those groups of fields could become multiple?

Grouped fields?

zeta ζ - March 12, 2008 - 01:20

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…

That's what I did a few

sto - March 12, 2008 - 13:51

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 -

baronmunchowsen - March 12, 2008 - 19:43

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

all-in-one CCK field

jinjyaa - March 18, 2008 - 16:27

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

baronmunchowsen - March 18, 2008 - 17:08

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

netron - July 1, 2008 - 08:56

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

An alternative approach

nevets - March 12, 2008 - 03:11

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

baronmunchowsen - March 12, 2008 - 19:46

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

andershal - March 28, 2008 - 13:09

subscribing

subscribing

midkemia - April 14, 2008 - 21:26

subscribing

subscribing

darrenmUK - April 24, 2008 - 22:36

subscribing

Subscribing

okeedoak - April 30, 2008 - 20:01

Subscribing

me too :)

sifaan - June 14, 2008 - 14:22

me too :)

This seems to be a pretty common & necessary use case

abloodworth - June 9, 2008 - 23:18

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

netron - June 27, 2008 - 09:22

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

netron - June 27, 2008 - 12:03

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.

Feature Request Submitted

baronmunchowsen - June 16, 2008 - 16:21

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

http://drupal.org/node/271226

I need this feature myself.

j0rd - June 28, 2008 - 07:26

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

darcy's example is only in D5

dmahmoudi - July 24, 2008 - 04:33

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

ulfk - July 29, 2008 - 08:53

subscribing

Subscribing

Drup-rider - August 6, 2008 - 02:28

Subscribing

Subscribing

trzyem - August 6, 2008 - 07:36

Subscribing

subscribing

Cybso - August 18, 2008 - 20:37

subscribing

Subscribing

jakeo - August 21, 2008 - 19:09

Subscribing.

So many subscribers, so

marcvangend - September 3, 2008 - 21:06

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.

Hi, thanks for posting

baronmunchowsen - September 5, 2008 - 16:09

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

gauravkumar87 - September 17, 2008 - 09:05

subscribing

subscribing

dydecker - September 21, 2008 - 22:31

subscribing

ditto

primalmedia - September 26, 2008 - 15:22

subscribing

progress

marcvangend - September 28, 2008 - 13:14

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

Yet another subscriber ;-)

singularo - September 28, 2008 - 09:44

Yet another subscriber ;-)

Subscribing

mattiasj - October 8, 2008 - 12:06

Subscribing

ditto

asimov - October 12, 2008 - 06:56

ditto

Subscribing. This feature is

curagea - October 16, 2008 - 19:28

Subscribing. This feature is much needed for many things.

subscribing

Break9 - October 18, 2008 - 16:48

subscribing

subscribing

obrigado - October 22, 2008 - 09:52

subscribing

suscribe

wdennen - October 31, 2008 - 18:25

thanks

another subscribe

davebv - November 14, 2008 - 11:07

thanks too

 
 

Drupal is a registered trademark of Dries Buytaert.