☁️ Loving our new documentation website? Provide feedback in the CloudCannon Community! ✨

values

Table of contents

Description:

This key defines the values available to choose from.

Optional, defaults to fetching values from the naming convention (e.g. colors or my_colors for data set colors).

Appears in:
└── _inputs
    └── *
        ├── Select Input
        │   └── options
        │       └── values
        ├── Multiselect Input
        │   └── options
        │       └── values
        ├── Choice Input
        │   └── options
        │       └── values
        └── Multichoice Input
            └── options
                └── values
Types:

This key defines a reference to a dataset.

This key represents an individual text string in the options.values array for Select Inputs.

The value is a string that specifies an available option to choose from.

Show examplesHide examples

In this example, we have configured an array of text values for a select input.

Copied to clipboard
_inputs:
  category:
    type: select
    options:
      values:
        - Blog
        - News
        - Events
{
  "_inputs": {
    "category": {
      "type": "select",
      "options": {
        "values": [
          "Blog",
          "News",
          "Events"
        ]
      }
    }
  }
}

This key represents an individual object in the options.values array for Select Inputs.

Show examplesHide examples

In this example, we have configured an array of object values for a select input.

Copied to clipboard
_inputs:
  status:
    type: select
    options:
      values:
        - icon: edit_note
          value: draft
        - icon: check_circle
          value: published
{
  "_inputs": {
    "status": {
      "type": "select",
      "options": {
        "values": [
          {
            "icon": "edit_note",
            "value": "draft"
          },
          {
            "icon": "check_circle",
            "value": "published"
          }
        ]
      }
    }
  }
}
Object ValuesObject<unknown>#
Examples:

In this example, we have configured a Select Input with custom values to choose from.

Copied to clipboard
_inputs:
  category:
    type: select
    options:
      values:
        - Blog
        - News
        - Events
{
  "_inputs": {
    "category": {
      "type": "select",
      "options": {
        "values": [
          "Blog",
          "News",
          "Events"
        ]
      }
    }
  }
}
Open in a new tab