[support] Connecting CCK Fields

Steven Scotten steves at splicer.com
Thu Sep 24 04:31:13 UTC 2009


OK, let's see if I understand correctly. You have Content Type  
"Parent" comprised of the following fields:

First Name
Last Name
Child's Birthday
Child's First Name
Child's Last Name

and you want to create an indefinite number of sets of those last  
three fields.

If that's right, there's good news and bad news. The good news is that  
CCK3 has multigroups, which allow you to do exactly what you can do  
with single fields (namely allow multiple or indefinite numbers of  
instances of that field per node) except with an entire fieldgroup.

The bad news is that that feature is in CCK3, which you're welcome to  
download and use, but it's not released even as an "alpha" version.  
Use on a production website? Not for the non-masochists in the  
audience. That's asking for trouble.

Instead, you might try the Flexifield module:

http://drupal.org/project/flexifield

The end result looks similar, but it does require building a node type  
for the (in my example) child data. You build a Flexifield content  
type out of CCK components and that content type becomes available as  
a form field, except that it's really a group of multiple fields.  
Flexifields, like other CCK fields, can include an indefinite number  
of themselves. I don't think it even creates new "child" nodes... but  
you have to create the "Child" content type.

Personally, I like the CCK Multigroups solution better, but if you  
need it right away and especially if you have more complicated needs  
(where unknown module conflicts might pop up), you should stay away.  
If you're not launching for a few months or it's internal-use only,  
you might get away with it. I just refuse to take responsibility for  
recommending a pre-alpha module, dig?


Steve

On Sep 23, 2009, at 9:04 PM, Steve Kessler wrote:

> The idea is that there are multiple fields on the same node that are  
> related and multiple instances of these fields. Think of three  
> columns on a spreadsheet and potentially unlimited rows.
>
> Thanks,
> Steve
>
> Steve Kessler
> Denver DataMan
> 303-587-4428
> Sign up for the Denver DataMan Free eNewsletter
>
> From: Steve Kessler [mailto:skessler at denverdataman.com]
> Sent: Wednesday, September 23, 2009 9:44 PM
> To: support at drupal.org
> Subject: [support] Connecting CCK Fields
>
> Hey Drupal Community!
>
> I am trying to come up with a way to link three CCK fields together  
> so that when you add multiple values to the same node you have three  
> connected CCK fields in this case.
>
> The use is when someone works on a case tracker case they should  
> have the date, the hours worked, as well as their user name.  We  
> don’t want to have to make a new node each time for this.
>
> Another use case is users upload pictures and the admin needs an  
> excepted check box for each uploaded image on the same node.
>
> I hope I am making sense.
>
> If anyone has an idea of how to make this work I would appreciate it.
>
> Thanks,
> Steve
>
> Steve Kessler
> Denver DataMan
> 303-587-4428
> Sign up for the Denver DataMan Free eNewsletter
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]



More information about the support mailing list