How can I capitalize the first letter of field names in the Content Manager

System Information
  • Strapi Version: 4.24.4
  • Operating System: MacOS
  • Database: Postgres

Current Behaviour

The names of fields inside the Content Manager started with small letters. It looks unprofessional.

As you can see in the above shown image, the field names are as:

  1. excerpt
  2. title

However, I want them to be displayed as:

  1. Excerpt
  2. Title

Solutions Tried

Sure, I can edit the model and change the field name to e.g. Title.

But doing so will interfere with GraphQL queries.

In GraphQL queries, I’ll also have to write the capital letters field names as:

query {
  blogPosts {
    data {
      id
      attributes {
        Title
        Excerpt
      }
    }
  }
}

This can lead to confusion between Field Names & Type Names.

Conventionally, Field Names start with small letters and Type Names start with capital letters.

Desired Behaviour

  • in GraphQL queries, field names should start with small letter
  • in Content Manager, field names should start with capital letter

OP here.

My bad, I didn’t know it. But Strapi actually provides a very elegant solution to this problem out of the box.

Solution

  1. Go to Content Manger in Strapi dashboard
  2. Click on an entry
  3. Entry edit form will be displayed, click on Configure the View in the sidebar
  4. A drag-n-drop editor will be displayed where you can customize how the edit view will look like.
  5. Click on pencil icon placed next to any field name
  6. A modal will be displayed, edit the Label field.

Hope this helps someone in future.