Manage Fields: Field Collections

  1. In our example of a Visiting Lecturer content type, we want to have the flexibility of adding multiple dates, times, and locations to the content type.  While we could just create a set number of fields, that can be cumbersome. Instead we can use Field Collections that will allow us to only have the number of fields that we need.  Need to add another date, time, and location for the Visiting Lecturer?  Just click on the Add another item in your completed content type, and you will have another collection of fields to fill out.

    Add another item/field collection

  2. To create a Field Collection, we need to do the following.  Go to Add new field, update the Label (it is best to be descriptive if possible), select Field collection from the Field Type drop down menu, select Embedded in the Widget drop down menu, and finally, click Save.

    Add field collection

  3. On the Field Settings tab, keep the Hide blank items checked and click Save field settings.
  4. You can then add some help text if needed and at the bottom, set the Number of values.  What this value does is allow you to allow only a certain number of dates and locations added to your content type.  For this exercise, we are setting it to unlimited.

  5. As you can see, the Date & Location field collection is just one line in our content type.  How can we define the settings for the separate date and location fields?  To do that we have to go to Field Collections by going to Structure -> Field Collections.  Drupal treats them like their own separate content type.  By adding the field collection in our content type like we did above, it will also add it to the Field Collections page for us to add to and edit.

Next: Field Collections: Date Field Type »


Training Calendar
CMS Help

If you are experiencing a critical issue with your live website, please contact the IT Customer Service Center at 864-8080 or itcsc@ku.edu.

For questions on CMS policy, look & feel, and all other issues, please visit our help page.

Please contact web services at 864-6415 or webservices@ku.edu for help with your site

Online help can be found under the How-To's section of this website.