Skip to content

Allow array types to be set #79

Description

@lorenzulrich

Currently it seems that I cannot create a field with type array:

                salutation:
                  type: 'Sitegeist.PaperTiger:Field.RadioButtons'
                  properties:
                    name: 'salutation'
                    label: 'Anrede'
                    isRequired: true
                    options: [label: 'Frau', value: 'Frau'], [label: 'Herr', value: 'Herr']

How a RadioButtons element looks in the node properties:

{
    "isRequired": true,
    "customErrorMessageEnabled": false,
    "name": "salutation",
    "label": "Anrede",
    "options": {
        "0": {
            "label": "Frau",
            "value": "Frau"
        },
        "1": {
            "label": "Herr",
            "value": "Herr"
        }
    }
}

Error message:

Configuration "childNodes.fields.childNodes.fieldset.childNodes.salutation.properties.options" | RuntimeException(Template configuration properties can only hold int|float|string|bool|null. Property "options" has type "array", 1685725310730)

Is this concious limitation or not possible technically?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions