# Exercise 8.7: Set up profile fields

Previously, you added fields to content types. You can also add fields to user profiles. This means you can let users share information about themselves and then you can display it. You can also control permissions so only trusted users can see profiles. Below you can see the profiles will have a text field for description and also a list of interests and a profile picture.

![Image of User profile with image](https://3186608908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LzAsrTcKaHnLDg-7ALW%2Fuploads%2Fgit-blob-9a34f52d858576ec4ed484b7154fe77bb38413fd%2FEx-8-7-User-Profile-Fields-1.png?alt=media)

## Add a text field for a biography

1. Go to *Configuration* → *People* → *Account settings* → **Manage fields**.
2. This interface is similar to the one for adding fields to content, now you can Add a new field with the following settings:
3. **Type:** Text → Text (plain, long)
4. **Label:** About me
5. **Machine Name:** field\_about\_me
6. Go to the **Manage form display** tab and set the **Widget** for About me to: *Text area (multiple rows)*.

   <img src="https://3186608908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LzAsrTcKaHnLDg-7ALW%2Fuploads%2Fgit-blob-b7e3c388ede6f7a23095db96c78386e8bcea609d%2FEx-8-7-User-Profile-Fields-2.png?alt=media" alt="Image of User profile with image" data-size="original">
7. Review the User settings. We will keep all the default settings, however, review the options before you save.
8. Click Save settings.

## Add a taxonomy field for interests

We need to create a new “Interests” vocabulary we can use in this case.

1. Go to *Structure* → *Taxonomy* → **Add vocabulary**.
2. **Name:** Interests
3. **Save** the vocabulary
4. At this stage we can decide not to add any terms to the vocabulary, rather rely on users to add them when they create or update their profile.
5. Go back to *Configuration* → *People* → *Account settings* → **Manage fields**.
6. **Add** a new field:

   * **Type:** Reference → Taxonomy term
   * **Label**: Interests
   * **Allowed number of values:** Unlimited
   * **Create referenced entities if they don't already exist:** Yes
   * **Vocabulary**: Interests

   <img src="https://3186608908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LzAsrTcKaHnLDg-7ALW%2Fuploads%2Fgit-blob-bcff553c0539c0cc837e805fe235777f39f4d0c0%2FEx-8-7-User-Profile-Fields-3.png?alt=media" alt="Image of User profile with image" data-size="original">

   * **Widget:** Select *Autocomplete (Tags style).* This can be configured after you add the field, from the *Manage form display* tab.
   * **Save** settings.

## Test by editing your account

Return to the front page.

1. Click **Your username** in the top administration menu, then *View profile*, then the **Edit profile** tab.

   <img src="https://3186608908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LzAsrTcKaHnLDg-7ALW%2Fuploads%2Fgit-blob-f5b84d0b0cfe06cd823b754c928686be19c3dfa6%2FEx-8-7-User-Profile-Fields-4.png?alt=media" alt="Image of Edit profile page" data-size="original">
2. At the bottom of the form you can see the options available.
3. Fill in some text for **About me** and type in tags (comma-separated for multiple tags) for **Interests**, such as *Jogging, Sailing, Drupal.*
4. Under **Picture**, upload an image if you haven't already.
5. Save.

Click the **View** tab and now you can view the admin profile.

You can also manage the display of the fields, for example hiding the label. As your Drupal skills improve, you can make changes to the site design through *Theming* to alter the way this information looks; or change what displays through *Manage display* configuration pages.
