[SOLVED] Save default value for booleans in array

Currently, the default values for boolean fields within an array are not saved in the json. Can this be added?

For example I have an array of MediaItems, within this array there is the field ShowContactButtons. I have saved a default value of false (as seen in the picture), this field is not saved in the json. Whereas these default values are saved when the boolean field is not within an array. I have not tested this for other fieldTypes within an array, maybe it is not specifically for the boolean fieldType.

 {
        "name": "MediaItems",
        "properties": {
            "fieldType": "Array",
            "label": "Media",
            "hints": "Als er niks gekozen is wordt er een groene achtergrond getoond."
        },
        "partitioning": "language",
        "nested": [
            {
                "name": "Image",
                "properties": {
                    "fieldType": "Assets",
                    "previewMode": "ImageAndFileName",
                    "maxItems": 1,
                    "allowedExtensions": [
                        "png",
                        "jpeg",
                        "jpg",
                        "svg"
                    ],
                    "label": "Afbeelding",
                    "hints": "Dit veld is leidend t.o.v. 'Youtube video id' & 'Toon contact knoppen'."
                }
            },
            {
                "name": "ImageAltTag",
                "properties": {
                    "fieldType": "String",
                    "editor": "Input",
                    "contentType": "Unspecified",
                    "label": "Afbeelding alt tag"
                }
            },
            {
                "name": "YoutubeVideoId",
                "properties": {
                    "fieldType": "String",
                    "editor": "Input",
                    "contentType": "Unspecified",
                    "label": "Youtube video id",
                    "hints": "Dit veld is leidend t.o.v. 'Toon contact knoppen'."
                }
            },
            {
                "name": "ShowContactButtons",
                "properties": {
                    "fieldType": "Boolean",
                    "editor": "Checkbox",
                    "label": "Toon contact knoppen",
                    "hints": "Dit toont de 'Bel ons' en 'E-mail ons' knoppen."
                }
            }
        ]
    },

image

I am using the Cloud version.

Thats weird…I will have a look.

1 Like

Solved and deployed to the cloud.

1 Like

This topic was automatically closed after 2 days. New replies are no longer allowed.