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

remove_empty_inputs

Table of contents

Description:

This key toggles whether CloudCannon will remove empty inputs from a file using a given Schema before persisting them to your file.

Setting this key to true will remove empty inputs from a file using a given Schema before persisting them to your file. CloudCannon considers an input to be empty when its value is null, ' ', or undefined. If this key is true, empty inputs will be visible in the Data Editor and the sidebar of the Visual Editor and Content Editor, but not the Source Editor. For this key to function, you must also define _schema in your file.

Appears in:
└── collections_config
    └── *
        └── schemas
            └── *
                └── remove_empty_inputs
Type:
boolean
Default value:
false
Examples:

In this example, CloudCannon will remove empty inputs in files using the article schema in the blog Collection.

Copied to clipboard
collections_config:
  blog:
    schemas:
      article:
        remove_empty_inputs: true
{
  "collections_config": {
    "blog": {
      "schemas": {
        "article": {
          "remove_empty_inputs": true
        }
      }
    }
  }
}
Open in a new tab