Compound Fields

Categories

Component ID

2760039

Component name

Compound Fields

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

This module provides compound fields of multiple types and combinations. (And most likely will always be a work in progress as we add new combos) The Field Collection module does a great job for most sites, although I believe it is inefficient in trying to solve the larger issue. (I'm working on a blog post right now to go into more detail) There is also Multifield project which attempts to create compound field through the UI. When I started this project, this still had an alpha release. And from what I've seen, it looks like a great alternative as well. I look forward to see it's progress.

For me, as a developer I've created this simple label/value pair of compound field for multiple projects and figured it was about time to try and make a module out of it.

Use Case

One case that has popped up over and over for me as a developer has been a field with a label-value. The best example is for creating a contact. You want to add a phone number (Multi-value field in Drupal), but each field needs two values, the actual phone number and a label (mobile/home/work) etc. Now there are some field modules out there that handles these nicely but can be very specific. This module will try to keep it as generic as possible but allow for settings to customize each field instance.

Who is this module for?

First, I see this module for the beginner developer. It adds some simple field combinations that otherwise wouldn't exist and you would need Field Collection module.
Second, this can be for the mid to advanced developer to use as a guide to develop their own combo fields (and hopefully contribute here).

Current Fields

D7:

  • Combo: Text-Long - Text
  • Combo: Text - Text



D8:

  • Combo: Text - Text

Future Compound Fields

  • Combo: List(Text) - Text
  • Fields relating to Entity Reference Fields



Please add issues for suggested field combinations.