Pennebaker / craft-architect

A plugin for importing and exporting content models from Craft 3/4 using JSON.
MIT License
72 stars 6 forks source link

Issue with Checkboxes on import #18

Closed Emkaytoo closed 6 years ago

Emkaytoo commented 6 years ago

See the image below. Model had 6 options in the options array in the model. The options were added, but the labels and values were not. The field model that I used was exported from a field that was made in the CP.

checkbox-error

Emkaytoo commented 6 years ago

By the way, I went to export it in its error state to see what would happen, and the field exported with the option labels and values.

{
    "fieldGroups": [
        "Contact Information"
    ],
    "fields": [
        {
            "group": "Contact Information",
            "name": "Inherited Contact Information",
            "handle": "inheritedContactInformation",
            "instructions": "Which contact information is this location going to inherit?",
            "type": "craft\\fields\\Checkboxes",
            "options": [
                {
                    "name": "Main Phone Number",
                    "handle": "mainPhoneNumber",
                    "default": ""
                },
                {
                    "name": "Alternate Phone Number",
                    "handle": "alternatePhoneNumber",
                    "default": ""
                },
                {
                    "name": "Fax Number",
                    "handle": "faxNumber",
                    "default": ""
                },
                {
                    "name": "General Email Address",
                    "handle": "generalEmailAddress",
                    "default": ""
                },
                {
                    "name": "Sales Email Address",
                    "handle": "salesEmailAddress",
                    "default": ""
                },
                {
                    "name": "Customer Service Email Address",
                    "handle": "customerServiceEmailAddress",
                    "default": ""
                }
            ]
        }
    ]
}
spAnser commented 6 years ago

They should be label value and not name handle