Field Types & Item Values

Field Types

You can see which field types are included in your collection, by making a request to the Get Collection endpoint.

Some field types use slightly different names in the Designer and Editor. For these fields, they have an “alt name” listed here which is the xname of the field we publicly display. (For the API however, we only use the actual name of the field type)

Plain Text

Basic text content that doesn’t need special formatting.

Field Format

string

Example

"Who's Lorem Ipsum?"

Rich Text

A long text field that can span multiple lines. Accepts HTML Formatting.

Field Format

string

Example

1"<h2>Impedit porro sed necessitatibus unde.</h2>
2<p>Ut in pariatur. Sunt molestiae possimus maiores sed excepturi impedit tempore. Reprehenderit eum corrupti numquam. Quia possimus asperiores excepturi sit et quia doloremque nihil aut. Ipsa fugit architecto laboriosam totam consequatur aut modi iusto. Maxime dicta consequatur rem et voluptatem.</p>
3<h3>Suscipit culpa dolores sunt.</h3>
4<blockquote>Labore ullam molestiae dolor illo ut officiis. Commodi tenetur ab aut aut adipisci. Aut illo qui. Ut dolorem nemo doloremque voluptatem assumenda animi perferendis.</blockquote>
5<p>Deserunt aut sunt nam cumque rerum ex. Similique aut ipsam hic. Quibusdam qui iusto corrupti deleniti error. Beatae expedita reprehenderit qui ut et nam. Sapiente sunt et et facere est ipsum laudantium amet et.</p>
6<p>Illo autem voluptates adipisci amet maxime harum voluptatem molestiae. Sed omnis voluptatem vel architecto quis qui repellendus ut nihil. Temporibus autem est est velit consequatur. Aut non voluptatem atque qui sunt expedita non quibusdam.</p>"

ImageRef / Image

The image field allows you to upload an image for your Collection items and use it in your designs. Images must be hosted on a publicly accessible URL to be uploaded via the API. The maximum file size for images is 4MB.

You can also add an image that already exists in the CMS by referencing its fileId.

Field read format

1{
2 fileId: string,
3 url: string,
4 alt?: string
5 }
6

Field write format | New Upload

1{
2 url: string,
3 alt?: string
4 }

Field write format | Existing Image

string

Example | New Upload

1{
2 url: 'https://static.wikia.nocookie.net/great-characters/images/7/70/Finn_and_Jake-0.png/revision/latest?cb=20180905030951'
3 alt: 'Finn and Jake fist bumping'
4}
5

Field write format | Existing Image

"6390ba25bfe63b0cca1dd136"

ImageRefSet / Multi-Image

The multi-image field allows you to upload an image for your Collection items and use it in your designs. Images must be hosted on a publicly accessible URL to be uploaded via the API. The maximum file size for images is 4MB.

You can also add images that already exist in the CMS by referencing the fileId.

Field read format

Array<{
id: string,
url: string,
alt?: string,
}>

Field write format | New Images

Array<{
url: string,
alt?: string,
}>

Field write format | Existing Images

[fileId, fileId]

Example | New Images

[
{
url: 'https://static.wikia.nocookie.net/great-characters/images/7/70/Finn_and_Jake-0.png/revision/latest?cb=20180905030951'
alt: 'Finn and Jake fist bumping'
},
{
url: 'https://mystickermania.com/cdn/stickers/adventure-time/at-finn-jake-hug-512x512.png'
alt: 'Finn and Jake hugging'
},
{
url: 'https://static.wikia.nocookie.net/adventuretimewithfinnandjake/images/f/fe/Finn_and_Jake_dancing.png/revision/latest?cb=20140325005126'
alt: 'Finn and Jake dancing'
},

Example | Existing Images

["6390bc3207672b4894e99216", "6390ba25bfe63b0cca1dd136"]

Adds videos hosted on platforms such as YouTube or Vimeo through a URL. These are usually connected to a video element.

Field format

string

Example

"https://www.youtube.com/watch?v=jfKfPfyJRdk"

Adds a generic link that can be connected to any link element such as a button, a text link, or a link block.

Field format

string

Example

"webflow.com"

Email

Adds an email address field to collection items.

Field format

string

Example

"hello@webflow.com"

Phone

Field format

string

Example

"2024561111"

Number

Add any kind of number (integer, decimal) to your collection items.

Field format

number

Example

1234

DateTime

Add a date and time picker to your collection items.

Field read format

string

Field write format

Date | string

Example

new Date() | "2022-11-18T00:00:00.000Z"

Switch

Adds a way to separate collection items.

Field Format

boolean

Color

Adds a unique color to each collection item which can be applied as text color, background color, and border color in your designs. Accepts a HEX code as a string.

Field Format

string
accepts the following formats
#RGB
#RGBA
#RRGGBB
#RRGGBBAA
rgb(red,green,blue)
rgba(red,green,blue,alpha)
hsl(hue,saturation,lightness)
hsla(hue,saturation,lightness,alpha)
orchid, aqua, black, ...
transparent

Example

'#4353FF'

Option

Creates a list of predefined values so you can pick one for each collection item. You can pass either the option_id or the string name of the option.

Field Format

string

Example

"Option 1" | '8a64b96afc53fe237fac5537e552a3c1' // Pass either the name of the option or the option_id

File

Adds a file to your collection items that you can connect to any link element in your project.

Field read format

1{
2 fileId: string,
3 url: string,
4 alt?: string
5}

Field write format

1{
2 url: string,
3 alt?: string
4}

Example

1{
2 url: 'https://data.wa.gov/api/views/f6w7-q2d2/rows.csv'
3 alt: 'Electric Vehicle Population Data'
4}
5

ItemRef / Reference

Links to other collection items from the same or different collections.

To write a value to a reference field, you’ll need the _id of the collection item you’re looking to reference. To find the _id of the referenced item, you’ll first need to get the collectionId of the referenced collection. You can find this by making a request to the Get Collection endpoint of the current collection, and referencing the fields property of the collection object.

The fields property returns the collection’s schema as an array of field objects. Within the array, find the reference field you want to write to. To get the collectionId of the field’s referenced collection, access the field’s validations['collectionId] properties.

Using the referenced collectionId, make a request to the List Collection Items endpoint, to get a list of the referenceable items in the field. Use the appropriate item _id to write to the reference field.

Field Format

string

Example

'63764ec7981aa0138e99abc4'

Set / Multi-Reference

Similar to a reference field, but you can link to multiple items from a collection of your choice.

See above instructions on how to access reference item ids

Field Format

Array<string, string, string>

Example

['63764ec7981aa0138e99abc','63764ec7981aa0138e99abc5','63764ec7981aa0138e99abc6']

User

Unique User ID that cannot be set by a user. Only used for created-by and updated-by fields.

Field Format

string

Example

"Person_63209baeac0b804b455624ce"