4

Is it possible to generate fields which are "grouped" together when marked as Unlimited? For example, a select field with label "What time do you wake up?" lets the user select the day of the week (Mon-Sun) then beside it an empty textfield to type in the time they get up. These 2 fields are "grouped" together. Then if they want to add another day of the week (Unlimited), the new field generates a dropdown menu and a textfield together all over again.

NOTE: No CCK please. I'm using Drupal 7 and it's already in the core.

3 Answers 3

2

Try the Field Collection module. It's not stable yet (beta 1) but it looks promising.

3
  • I'll check it out.
    – enchance
    Commented May 14, 2011 at 20:44
  • Stupid question but how do I use Field Collection? I just installed it.
    – enchance
    Commented May 14, 2011 at 20:50
  • You can download the recruiter distribution to see how it's implemented. Other wise the field collections or like nodes (entities) that you can add to the actual node as a field for each collection. So, make a bunch of collections like they are their own node, then make a node and add the collections which are individual fields.
    – Adam S
    Commented May 14, 2011 at 21:01
0

I know the Drupal way to build a module that solves everybody's problems but I needed something a little more specific. Here is my business hours module. I made it with the Field API which is actually very easy to use.

1
  • IMO there is nothing wrong with a well written custom module that uses the API as intended. Thanks for sharing. Commented May 14, 2011 at 21:40
0

This is actuall a feature in CCK 3, which is in alpha for D6 but not yet available (as an "extras" module) for D7...

Shame, they should've had this by default.

Here is a discussion about modules that have similar functionality:

http://drupal.org/node/939836

But Field collection seems to be the smartest choice for now.

1
  • While OP has specified no CCK solutions, it is nice to have them.
    – Isaac
    Commented Nov 2, 2013 at 15:39

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.