Field Collections: Location Term Reference

  1. We now need another field in our field collection, this time for Location.  We will once again go to Add new field and enter in the label we want to use, but this time we will select Term reference for our Field Type and Autocomplete term widget (tagging) in the widget drop down menu.  

    Add Location field, select term reference and autocomplete

    We could use just make it a text field type, but am electing to use term reference so that we can record all locations entered into this location field into its own taxonomy.  You can think of this as its own table that just stores the location information that user's have entered through your content type that can then be used as suggestions when filling out the location field in your content type the next time you used it.  For instance, if you started to enter in "10" in the location field, since we have it set to Autocomplete, it will look at that taxonomy table and find all locations it has that have "10" in them and suggest them to you below.

    Example of Autocomplete in Location field

  2. After you added your new term reference field for location, it will take you to the Field Settings section and ask you to select the Vocabulary which supplies the options for your location field.  What it is really asking you is what Taxonomy are you going to use.  You can select an existing one or you may want to create a new one to use for this field.  To create a new one, got Structure -> Taxonomy and then click on the + Add vocabulary link.  Now we can create the taxonomy.  Enter in the Name and click Save.

    Create new taxonomy

  3. Now go back to your field collection (if you have it open in another tab, you can just refresh the page) and edit the location field and in the Field Settings section of either the Edit tab or the Field Settings tab, select the new taxonomy we just created.

    Location Field settings - select your taxonomy

  4. We now have all of the fields we need for our custom content type.  Now we just need to organize and style them.

Next: Manage Display: Add New Group »


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.