Add more information (fields) to a Flagging Collection

Last updated on
6 September 2021

This describes how you can add extra information to your Flagging Collections. For those of you that have been using Drupal 8 for a while this is probably not something new.

Let's say that you want to add some info to a Flagging collection like what it is used for. This is how it can be done:

  1. Click "My Flagging Collections" tab at the top of the page.
  2. In the table find your "Flagging Collection" and remember the name of the "Bundle" used for it.
  3. Click the "Bundle name".
  4. On the bundle page find the Bundle you remembered in 2) and click the small Arrow pointing downwards under Operations.
  5. Click "Manage Fields".
  6. Click the "+Add Field" button.
  7. For this case I would select "Text (Formatted)" in the drop-down list as this is a single line text field.
  8. Give it a name, like "Used for".
  9. Click "Save and continue".
  10. In this case I would not change anything so I would click "Save field settings".
  11. Fill in the wanted settings and click "Save settings".
  12. Now go back to the site and click the tab "My Flagging Collections" again.
  13. Click "Edit" under operations for one of your Flagging Collections.
  14. On the Flagging Collection page you will now have the possibility to fill in something in the field "Used for".
  15. When done, click "Save".
  16. Do this for all of your Flagging Collections where you would like note what it is used for.
  17. The field you now have added can be used in a views where you list your Flagging Collections together with all other info on the collection.

Basically the same procedure can be used for adding comments to Flagging Collections. There are however a few more steps needed to get it to work:

  1. The first step is to make sure that you have a Comment type which will work for "Flagging Collections". This is setup under "Manage" / "Structure" / "Comment types"
  2. On this page click "+ Add comment type". Give it a name under "Label" you will remember and possibly a "Description".
  3. The most important is to select "Flagging collection" under "Target entity type".
  4. When the above is done, click "Save"
  5. Now you can follow the steps described above. But instead of selecting "Text (Formatted)" under "7" above, you select "Comments" instead.
  6. Set the "Label" and click "Save and continue".
  7. On the next page you should see the label you chose for your "Comment type". Click "Save field settings".
  8. Now you can continue from step 11 above!
  9. Good luck!

Help improve this page

Page status: No known problems

You can: