This key defines a user interface for lists of inputs or input groups.
Appears in
└── _inputs
└── *
└── Array InputType
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 _inputs entry.
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 comment globally, but use collection-specific label for inputs in different collections.
You can stop the cascade at any point in the configuration cascade by setting cascade to false.
Defaults to: true
Appears in: Text Input, Textarea Input, Code Input, Color Input, Boolean Input, Number Input, Range Input, Rich Text Input, URL Input, Select Input, Date/Datetime Input, Time Input, File Input, Multiselect Input, Choice Input, Multichoice Input, Object Input, Array Input.
Show examplesHide examples
In this example, we have configured cascade to merge input configurations across the configuration cascade.
_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.
Appears in: Text Input, Textarea Input, Code Input, Color Input, Boolean Input, Number Input, Range Input, Rich Text Input, URL Input, Select Input, Date/Datetime Input, Time Input, File Input, Multiselect Input, Choice Input, Multichoice Input, Object Input, Array Input.
Show examplesHide examples
In this example, we want to add helpful guidance for our page_description Input.
_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.
Appears in: Text Input, Textarea Input, Code Input, Color Input, Boolean Input, Number Input, Range Input, Rich Text Input, URL Input, Select Input, Date/Datetime Input, Time Input, File Input, Multiselect Input, Choice Input, Multichoice Input, Object Input, Array Input.
Show examplesHide examples
In this example, we want to add a context box to our date_created Input to explain its purpose.
_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_value with a new value when duplicated.
Setting this key to true will prevent rehydration of instance values when inputs are duplicated.
Defaults to: false
Appears in: Text Input, Textarea Input, Code Input, Color Input, Boolean Input, Number Input, Range Input, Rich Text Input, URL Input, Select Input, Date/Datetime Input, Time Input, File Input, Multiselect Input, Choice Input, Multichoice Input, Object Input, Array Input.
Show examplesHide examples
In this example, CloudCannon will prevent rehydration of instance values when inputs are duplicated.
_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 true will 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 YAML files, the string should be in ' or " quotation marks.
By default, this key is false (i.e., team members can edit input values).
Defaults to: false
Appears in: Text Input, Textarea Input, Code Input, Color Input, Boolean Input, Number Input, Range Input, Rich Text Input, URL Input, Select Input, Date/Datetime Input, Time Input, File Input, Multiselect Input, Choice Input, Multichoice Input, Object Input, Array Input.
Show examplesHide examples
In this example, we have configured the date_created Date input, which will automatically populate when you create a file using this input. Editors cannot alter this input as the interface is disabled.
_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.
Appears in: collections_config.*, Text Input, Textarea Input, Code Input, Color Input, Boolean Input, Number Input, Range Input, Rich Text Input, URL Input, Select Input, Date/Datetime Input, Time Input, File Input, Multiselect Input, Choice Input, Multichoice Input, Object Input, groups[*], [*], options.entries, groups[*], Array Input.
Show examplesHide examples
In this example, the documentation link for the data Collection goes to CloudCannon Documentation.
collections_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 creating a new file, or adding array items containing this Input.
Setting this key to UUID populates the Input with a uuidv4 key (e.g. 6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b) for identifying unique items (extremely unlikely to generate duplicates), and to NOW populates the Input with the current datetime in the Site's configured timezone.
Allowed values: UUID NOW
Appears in: Text Input, Textarea Input, Code Input, Color Input, Boolean Input, Number Input, Range Input, Rich Text Input, URL Input, Select Input, Date/Datetime Input, Time Input, File Input, Multiselect Input, Choice Input, Multichoice Input, Object Input, Array Input.
Show examplesHide examples
In this example, we have configured an input to automatically populate with a UUID when created.
_inputs:
id:
type: text
instance_value: UUID{
"_inputs": {
"id": {
"type": "text",
"instance_value": "UUID"
}
}
}This key defines the bold title text above an Input.
Appears in: Text Input, Textarea Input, Code Input, Color Input, Boolean Input, Number Input, Range Input, Rich Text Input, URL Input, Select Input, Date/Datetime Input, Time Input, File Input, Multiselect Input, Choice Input, Multichoice Input, Object Input, Array Input.
Show examplesHide examples
In this example, we want to customize the label for our page_title Input to be more descriptive.
_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 Array Inputs.
Appears in: Array Input.
This key defines the input type, which controls how this input appears and behaves.
Appears in: Array Input.