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

instance_value

Table of contents

Description:

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 UUID or NOW.

  • UUID generates a uuidv4 key (extremely unlikely to generate duplicates), useful for identifying unique items (e.g. 6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b)
  • NOW generates the current datetime in the Site's configured timezone
Appears in:
└── _inputs
    └── *
        ├── Text Input
        │   └── instance_value
        ├── Textarea Input
        │   └── instance_value
        ├── Code Input
        │   └── instance_value
        ├── Color Input
        │   └── instance_value
        ├── Boolean Input
        │   └── instance_value
        ├── Number Input
        │   └── instance_value
        ├── Range Input
        │   └── instance_value
        ├── Rich Text Input
        │   └── instance_value
        ├── Date/Datetime Input
        │   └── instance_value
        ├── Time Input
        │   └── instance_value
        ├── File Input
        │   └── instance_value
        ├── URL Input
        │   └── instance_value
        ├── Select Input
        │   └── instance_value
        ├── Multiselect Input
        │   └── instance_value
        ├── Choice Input
        │   └── instance_value
        ├── Multichoice Input
        │   └── instance_value
        ├── Object Input
        │   └── instance_value
        └── Array Input
            └── instance_value
Type:
string
Allowed values:
UUID
NOW
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"
    }
  }
}
Open in a new tab