简体   繁体   中英

Multiselect in Impresspages Plugin Options

How may I use a multiselect field in the Impresspages Plugin options. Something like this:

{
        "label": "Social Nets",
        "name": "socialNets",
        "type": "select",
        "multiple": "multiple",
        "default": "",
        "values": ["", "facebook", "twitter", "pintrest"]
}

Of course, the field above "multiple" doesn't work in this code snip. So, how to implement it in the plugin options json file?

You can use "Checkboxes" field type

"options": [
    {
        "label": "XXX",
        "name": "xxx",
        "type": "Checkboxes",
        "values": ["option1", "option2", "options3", "option4"]
    }
 ]

There is no such option implemented in the core of the system. Meaning, there's no such field type as 'multiselect'. You can check how other fields are implemented and extend the core, create pull-request and we'll add it in next release.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM