CMS (Formerly Content Manager): About Your Collection Fields

7 min read
Your CMS (Content Management System) collection fields store content about each item in your collection. The field type determines the kind of content you can store in the field as well as which elements on your site can connect to the field.

In the Table collection layout, the fields appear as vertical columns with the name of the field at the top and the content for each item stored in the cells. You can also choose the List or Gallery layout to manage your collection fields. 

Primary fields

Every collection must have a Primary field, indicated by a Flag icon next to the field name. By default, each collection includes a Primary field named "Title". If needed, you can change the name of this field or choose another to be your Primary field. We recommend making sure each item has a unique value in the primary field.

Primary fields are super important because they are used in the dynamic item page URL. Make sure to add unique content to the Primary field for each item that you wish to have a dynamic item page. Without content in the Primary field, a dynamic item page URL cannot be created for the item. In your collection, you can see how the Primary field is added to the Page Link field associated with your dynamic item page. 
Primary fields are also important for reference fields. When you create 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 values in the new Primary field. 

Regular fields

You can choose from a variety of field types when adding fields to your collections. Each field consists of a field type, field name, field ID, optional help text, and the ability to encrypt the field content as Personally Identifiable Information (PII). 

Additionally, you can set field validations to make certain fields mandatory, set character count limits, accept specific values in the fields only, and more. To prevent empty fields when you add new items, you can add default values that automatically populate in the fields. 

Field type

The field type determines what kind of content you can save in the field and which site elements can connect to the field. For example, the multi document field type can only save document files and connects to the Upload Button input element that allows visitors to upload files to your collection. 

You can change an existing field's field type to adjust the type of content it stores. Keep in mind that changing the field type can have negative effects, such as broken links, if the field was linked on your site. 

Field name

The field name appears at the top of each column in your collection's Table layout. You also see the field name when you connect elements to datasets that bind to your collection fields. Changing a field name changes it across your entire CMS and in your Editor without any effects on your live site. 

Field ID (Velo by Wix only)

The field ID 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, use the field ID.
1wixData.insert("CollectionName", {"fieldKey": "value"});
When you create a new field, the field ID is automatically created based on the field name. You can edit the field ID while adding a new field, but you cannot change it once the field has been created. 

Help text (optional)

Add help text to a field if you want a tooltip in your collection that explains what the field is for. If you save help text to a field, an icon appears next to the field name in your collection. You can hover over the icon to view the help text tooltip. This text only appears in your collection for you and collaborators with permissions. 

Encrypt as Personally Identifiable Information (PII)

Enable this toggle for additional backend encryption of sensitive data, like social security and passport numbers. Learn more about storing PII data.

System Fields

The CMS automatically creates system fields for each collection that are used in the backend code. When you add dynamic pages for your collection, Page Link fields for your dynamic list and dynamic item pages are also automatically created as system fields. The default system fields are hidden from your collection, but you can view them when you click Manage Fields from your collection. 

View the default system fields in the table below:  
Field Name
Field ID
Field Type
Description
ID
_id
Text
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. 
Created date
_createdDate
Date and Time
The date and time the item was added to the collection.
Updated date
_updatedDate
Date and Time
The date and time the item was last modified in the collection.
Owner
_owner
Text
A unique identifier for the creator of the item. Used by permissions to determine which user is assigned the Site member author role for the item.
Note:
Time fields in an exported CSV file are in UTC+0. They are NOT in local time. 

When you create dynamic pages, Page Link fields are automatically created in your collection as system fields. These fields create links for your dynamic list pages and for each item's unique URL on dynamic item pages. 

The format of the Page Link field depends on the type of dynamic page: 
  • Dynamic list pages: By default, the Page Link URL adds the collection name to the end of the dynamic list page's web address. 
  • Dynamic item page: By default, the Page Link URL adds the Primary field value to the end of dynamic item page's web address for each unique item. 
Tip:
Go to your Editor's page settings to customize the variables used in your dynamic pages. Editing the URL values in your Editor automatically updates the Page Link fields in your collection. 

Did this help?

|