CMS (Formerly Content Manager): About Your Collection Fields

4 min read
Your collections store your site's content. The collections organize your content with items (rows) and fields (columns). The fields usually describe the items. For example, if one item is a car, a field may list its color.

The image below shows a collection of 4 fields and 5 items.

Regular fields

Each field in a collection has a Field Name, Field Key (Velo by Wix only), and Field Type.

Field Name

The Field Name is the label you see at the top of the column in your collections. The Field Name is also used in datasets when you connect elements to the collection fields.
When you add a new field in a collection, you specify the Field Name. You can change the Field Name after the field has been created, and all connections to that field update automatically. 

(Velo by Wix users only) Field Key

The Field Key is used when referring to the field in code using the Data API or Dataset API.

For example, if you want to insert an item using the Data API, you use the Field Key.
1wixData.insert("CollectionName", {"fieldKey": "value"});
When you add a new field in a collection, the Field Key is created automatically based on the Field Name. You can specify your own field key, but you cannot change the Field Key once the field has been created. 

Field Type

The Field Type defines what kind of content the field contains. When you add a new field in a collection, you choose one of the following Field Types:
  • Reference
  • Text
  • Image
  • Boolean
  • Number
  • Date and Time
  • Address
  • Rich Content
  • Rich Text
  • URL
  • File
  • Video
  • Media Gallery
  • Time
  • Tags
The field type is used when connecting page elements to fields in your collections. You can only connect certain input elements to fields of relevant Field Types. For example, you can connect a text element to a Text or URL field but not to an Image field.

You cannot manually add new values of the wrong field type. However, when importing a CSV file, it is possible to use an invalid field type. For example, you could import a text value to a number field. If this happens, an error will let you know to fix the issue.

Use the Reference field type to select items from the primary field of the referenced collection. For more information, see Adding a Reference Field to a Collection.
You can change a field's type. Make sure to consider the effect this can have on your site before you do so. 

Primary fields

Every content collection has a primary field which can be used by reference fields to create connections between collections. A collection's primary field shows a flag icon next to its field name. By default, the Title field is the primary field. You can define any text field in your collection to be the primary field except for the ID system field.

When you fill in information in a reference field, you select from the values in the primary field of the referenced collection. If you change the primary field in the referenced collection, the values displayed in the reference field change to match the ones in the new primary field. It is good practice to ensure that each item has a unique value in the primary field.

For more information, see About Reference Fields

System Fields

Every content collection contains the default fields shown here. They cannot be edited and are hidden by default.
Field Name
Field Key
Field Type
A unique identifier for the item. You can assign the ID a value when you import new content from a CSV file. Otherwise the ID is a random UUID. 

Using Velo by Wix you can also assign the ID a value when adding items with the Data API. 

Once defined the ID cannot be edited. 
Date Created
Date and Time
The time the item was added to the collection.
Last Updated
Date and Time
The time the item was last modified in the collection.
A unique identifier for the creator of the item. Used by the permissions model to determine which user is assigned the Site member author role for the item.
Time fields in an exported CSV file are in UTC+0, they are NOT in local time. Learn More

Calculated Fields

When you create a dynamic page, a new field is added to the collection that the dynamic page pulls content from. This field contains a calculated URL with the dynamic page's prefix and the values of the fields that determine which content will be bound to the page.

For example, you might have a dynamic item page to show items from a Dishes collection based on their Title field. In your collection there will be a field called Dishes (Title) with URLs such as /Dishes/pizza and /Dishes/chicken.

When a visitor goes to a dynamic page, all the items in the collection with a URL that matches the URL of the page will be bound to the page's dataset.

For dynamic item pages, each item will have a unique URL. For dynamic list pages, multiple items will share a URL.

You cannot edit the contents of calculated fields. However, if you change the URL of your dynamic page, the URL in your collection will change accordingly. If you create multiple dynamic pages based on a collection, the collection will have one calculated field for each dynamic page.

For more information, see About Calculated Fields.

Did this help?