- Description:
This key defines an editing interface for data with multiple predefined options.
Multiselect inputs allow several values.
- Appears in:
└── _inputs └── * └── Multiselect Input- Type:
Object- Properties:
This key defines whether CloudCannon should merge this input configuration with any matching, less specific configurations elsewhere in the configuration cascade.
The configuration cascade works by finding the most specific
_inputsentry.Usually, once an option is found in the cascade, there's no reason to keep looking.
When this key is
true, the cascade continues looking and each entry found is merged.This key allows you to define some options globally while using specific options for other keys at different levels of the cascade.
For example, define a
commentglobally, but use collection-specificlabelfor inputs in different collections.You can stop the cascade at any point in the configuration cascade by setting
cascadetofalse.Defaults to:
trueShow examplesHide examples
In this example, we have configured cascade to merge input configurations across the configuration cascade.
Copied to clipboard_inputs: title: type: text cascade: true comment: Global comment for all title inputs{ "_inputs": { "title": { "type": "text", "cascade": true, "comment": "Global comment for all title inputs" } } }This key defines the subtitle text above an Input.
CloudCannon supports a limited selection of Markdown formatting for the value of this key: links, bold, italic, subscript, superscript, and inline code.
This key has no default.
Show examplesHide examples
In this example, we want to add helpful guidance for our
page_descriptionInput.Copied to clipboard_inputs: page_description: type: text label: Page Description comment: Enter a brief description of this page for search engines{ "_inputs": { "page_description": { "type": "text", "label": "Page Description", "comment": "Enter a brief description of this page for search engines" } } }This key defines a context box for extra information about an Input.
This key has no default.
Show examplesHide examples
In this example, we want to add a context box to our
date_createdInput to explain its purpose.Copied to clipboard_inputs: date_created: type: datetime label: Date of article creation instance_value: NOW context: open: false title: Help icon: help content: This date field will automatically populate when you create an article.{ "_inputs": { "date_created": { "type": "datetime", "label": "Date of article creation", "instance_value": "NOW", "context": { "open": false, "title": "Help", "icon": "help", "content": "This date field will automatically populate when you create an article." } } } }This key toggles whether CloudCannon will rehydrate inputs configured with an
instance_valuewith a new value when duplicated.Setting this key to
truewill prevent rehydration of instance values when inputs are duplicated.Defaults to:
falseShow examplesHide examples
In this example, CloudCannon will prevent rehydration of instance values when inputs are duplicated.
Copied to clipboard_inputs: id: type: text instance_value: UUID disable_instance_value_rehydration: true{ "_inputs": { "id": { "type": "text", "instance_value": "UUID", "disable_instance_value_rehydration": true } } }This key defines whether the value of an input is editable in the Data Editor or the sidebar of the Visual Editor or Content Editor.
Disabled inputs are useful if you want CloudCannon to display the input value, but prevent team members from editing the value outside of the Source Editor.
The value of this key can be a boolean or a string. A boolean value of
truewill prevent team members from editing the value.A string value can prevent team members from editing an input based on the value of another input.
You can reverse the value with a
!character at the beginning.publishedhides an input when the sibling inputpublishedis truthy!publishedhides an input when the sibling inputpublishedis falsy
For reverse values in
YAMLfiles, the string should be in'or"quotation marks.By default, this key is
false(i.e., team members can edit input values).Defaults to:
falseShow examplesHide examples
In this example, we have configured the
date_createdDate input, which will automatically populate when you create a file using this input. Editors cannot alter this input as the interface is disabled.Copied to clipboard_inputs: date_created: type: datetime label: Date of article creation comment: UTC +0 timezone disabled: true instance_value: NOW options: timezone: Etc/UTC{ "_inputs": { "date_created": { "type": "datetime", "label": "Date of article creation", "comment": "UTC +0 timezone", "disabled": true, "instance_value": "NOW", "options": { "timezone": "Etc/UTC" } } } }This key defines the documentation link at the top of a Collection browser.
Collection documentation is useful for assisting your team members.
Show examplesHide examples
In this example, the documentation link for the
dataCollection goes to CloudCannon Documentation.Copied to clipboardcollections_config: data: documentation: url: https://cloudcannon.com/documentation/ text: CloudCannon Documentation icon: star{ "collections_config": { "data": { "documentation": { "url": "https://cloudcannon.com/documentation/", "text": "CloudCannon Documentation", "icon": "star" } } } }This key defines whether an input is automatically populated with a value when the input is created.
This occurs when creating a new file, or adding array items containing this input.
Valid values are
UUIDorNOW.UUIDgenerates a uuidv4 key (extremely unlikely to generate duplicates), useful for identifying unique items (e.g.6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b)NOWgenerates the current datetime in the Site's configured timezone
Allowed values:
UUIDNOWShow examplesHide examples
In this example, we have configured an input to automatically populate with a UUID when created.
Copied to clipboard_inputs: id: type: text instance_value: UUID{ "_inputs": { "id": { "type": "text", "instance_value": "UUID" } } }This key defines the bold title text above an Input.
Show examplesHide examples
In this example, we want to customize the label for our
page_titleInput to be more descriptive.Copied to clipboard_inputs: page_title: type: text label: Article Title comment: Enter the main title for this article{ "_inputs": { "page_title": { "type": "text", "label": "Article Title", "comment": "Enter the main title for this article" } } }This key defines options that are specific to Multiselect Inputs.
Show examplesHide examples
In this example, we have configured Multiselect Input options including values.
Copied to clipboard_inputs: tags: type: multiselect options: values: - featured - news - events{ "_inputs": { "tags": { "type": "multiselect", "options": { "values": [ "featured", "news", "events" ] } } } }This key defines the input type, which controls how this input appears and behaves.
Show examplesHide examples
In this example, we have configured the
tagskey as a Multiselect Input type.Copied to clipboard_inputs: tags: type: multiselect{ "_inputs": { "tags": { "type": "multiselect" } } }- Examples:
In this example, we have configured the
tagskey as a Multiselect Input.Copied to clipboard_inputs: tags: type: multiselect label: Tags options: values: - featured - news - events{ "_inputs": { "tags": { "type": "multiselect", "label": "Tags", "options": { "values": [ "featured", "news", "events" ] } } } }