Getting started with Field Collection

  0 comments
Share

A field collection is internally represented as an entity, which is embedded in the host entity. Thus, if needed field collections may be viewed and edited separately too. Field Collection allows you to collect some fields together into a group. You can re-use those fields for multiple content types, users, comments or whenever you want to add those fields.

In this blog we are going to explore about how to create field using Field collection module and use those fields in a content types.

  1. Install Entity and Field collection module
  2. Add a Field Collection field in content type.

    Add your field name, select Field Collection from Field type column and select Embedded from Widget column and save that field like normal cck fields.

    Add Fieldcollection Type

    Now a field of type Field collection is created.

    Field Listing

  3. Set up the Field collection fields
    • Go to Structure > Field collections(/admin/structure/field-collections), You will see the field that you created.
    • Click on manage fields next to operations column.

      Click Manage Field

    • Now add fields for your "field collection" like as normal cck fields as added for content type.

      Field Collection Fields

  4. Use the fields
    • Go to /node/add/yourcontenttype
    • You will see the fields which you added in Field collection in step 3.

      Use field Collection Field

  5. You can make field collection as multiple.

    Multiple Field Collection

  6. You can make the individual field of field collection as multiple.

    Individual field multiple

  7. You can re-use field collection fields for multiple content types, users, comments like as other cck fields.

    Reuse field collection

Add new comment