Use the option field in Collections to give collaborators a list of predefined values to choose from.
The option field is built for any number of options you can select from a dropdown. Things like selecting from blog categories. Or choosing a preferred language. Setting a location — like what continent you're on. It's also great if you need to get info regarding gender, or maybe the department someone works in. Or something that contains fixed numbers. Or even number ranges like how many employees. And of course, we can do coffee sizes. And no, 31 ounces is not a typo.
A couple ways to practically use this. Number one: on the Canvas here, we can bind a text element to this field, getting the option text from the collection.
Of course, number two: we can also use a filter to display Collection List items based on the option we selected. In Filters, we'll add a filter. And when we select our option field from the dropdown, there are two approaches to doing this:
Equals or Does Not Equal will check against the Option field for a particular selection. And Is Set or Is Not Set simply looks for whether an option has been set in this field at all.
Now if we find ourselves adding options that like to stick together? Maybe we want to link a color to each blog category? We could just create a collection for blog categories. And instead of an option field, we could use a reference or multi-reference field.
But option fields are nice for giving us multiple, preset options which we can bind to text elements and use to filter content (or even create conditions) in a Collection List.
The option field is a Collection field that gives CMS users a list of predefined values to choose from. You can display the value of an option field in your Collection Lists and Collection Pages by connecting it to text elements. You can also use the option field to filter Collection Lists to show specific items. In the same way, you can set conditional visibility on elements in Collection Lists and Pages to display specific elements that meet the condition(s) you specify using the option field.
Common uses
In this lesson, we talk about:
Just like options, the reference field allows you to choose a value from a dropdown list. However, reference values are Collection items from another Collection. And you may want to use references instead of using options for many great reasons:
An option field can be added to a new or existing Collection. In Collection settings, click on New Field and then choose the Option field.
To add options:
You need to add at least one option to be able to save the Collection, and you can add up to 100 options.
To edit an option, just click on the option and edit the text.
To delete an option, click on the trash can icon that appears when you hover over an option.
You and your collaborators can choose only one of the options that you defined when creating the field. To remove a selected option, click the first item in the dropdown: “Select an option...”
On Collection Pages or in Collection Lists, you can connect a text element to the option field to get the option text from the Collection.
You can also access the inner text settings by selecting the text element and either clicking the settings icon next to the element label on the canvas or by going to the Settings panel (D).
You can remove the connection by unchecking the Get text from checkbox in the Inner Text Settings.
If you want to create a Collection List that displays only items that have a specific option value set:
The filter rules that you can use with the option field and values are:
If you create labels for each option value for an option field, you can add conditions to each label to show them only for items with that option value:
Something went wrong while submitting the form. Please contact support@webflow.com