Select Field Reference
This article explains what the Select field is and how to configure it in the Custom Type builder.
The Select field allows content writers to pick among a number of options from a dropdown menu.
When configuring a Select field you'll see the options to set the Field name, API ID, and Field placeholder.
Add one option per line. The options will appear in the order you enter them.
Slice Machine vs. Legacy Editor
Editing fields is almost identical in Slice Machine and the Legacy editor. But it is important to know that the mock config option (to add data to preview content fields in the Slice Simulator) is only available in Slice Machine.
Edit the JSON model with caution
Only edit the JSON model to make changes to the Rich Text field labels. Making abrupt changes can cause conflicts when synchronizing changes with your documents.
type
string (required)
Value must be Select
config
object
Object for the configuration options
config.label
string
The label that shows up for the field in the document editor
config.placeholder
string
A user-friendly placeholder for the field in the entry editor
config.options
array
An array of strings that will be the available options in the select dropdown
config.default_value
string
If it's set to the be first value in the options, the select will default to this option
The following JSON defines a Select field which defaults to the first option:
"example_select" : {
"type" : "Select",
"config" : {
"options" : [ "Yes", "No" ],
"default_value": "No",
"label" : "Is this a Featured Post?"
}
}
// API response example of a Select field
{
//...
"example_select": "My selected Value"
}
Was this article helpful?
Can't find what you're looking for? Spot an error in the documentation? Get in touch with us on our Community Forum or using the feedback form above.