Cornerstone Component Builder: How-to multi-select parameter options of "choose" type

I’m building a custom Cornerstone Component.

With the help of parameters, I would like to add “Hide During Breakpoints” functionality to my custom Component.

I did it with “choose” type.
How can I turn on multi-select for “choose” type? Or optionally for the “select” type?

So the user could select multiple items like:
Screenshot 2023-03-26 180423

My current code is:

"control-bp-hide" : {
          "type"    : "choose",
          "label"   : "Hide During<br>Breakpoints",
          "initial" : "",
          "offValue": "",
          "options" : [
            { "value" : "x-hide-xs", "icon": "ui:size-xs", "label" : "" },
            { "value" : "x-hide-sm", "icon": "ui:size-sm", "label" : "" },
            { "value" : "x-hide-md", "icon": "ui:size-md", "label" : "" },
            { "value" : "x-hide-lg", "icon": "ui:size-lg", "label" : "" },
            { "value" : "x-hide-xl", "icon": "ui:size-xl", "label" : "" }
          ]
        }

Resulting in:
Screenshot 2023-03-26 181503
where I can select only one option at the time, or none.

I can’t find any mention in your documentation about multi-select, but since this is such a basic functionality and you already have it built in Cornerstone, I’m sure it has to be a way to do it - it’s just I’m missing something.

Among other documentation I read:


Looking forward to hearing from you.
Kind regards.

Hi @dasbios,

Thanks for reaching out.
The choose type is allowed for the Multi Select. If you have followed our documentation, but it is not working as expected, we need to investigate it through the WordPress admin dashboard. I would request you, please provide login credentials for your site in a secure note to examine it further, including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

Thanks

Hi @tristup,

I’m sending you access information.

Default and un-modified theme Twenty Twenty-One is activated.

Hi @dasbios,

Unfortunately, the given credentials are not working. Can you please check and send it once again?

Thanks

Hi, @tristup,

They are working. I tried them again.

Do you get to the login?
What message do you get?

Hey @dasbios,

When entering the WP credentials, I don’t see the Google Recaptcha. That being said, I am not able to access the dashboard. Please disable the ReCaptcha in the meantime.

Thank you.

You have to click “I agree to these terms”, and ReCaptcha will show.

This is due to EU GDPR.

Hi @dasbios,

I have checked the choose type in my local environment and found that the type choose is not working as expected. I suspect this might be a bug in the recent version of Cornerstone. I will report this to the Issue Tracker for further investigation by our development team.

Thanks

Hi @tristup,

when do you expect the fix will be implemented?

Kind regards.

Hey @dasbios,

We do not have an ETA yet. I already forwarded this to our developer and escalated the issue to make it as a priority.

Please bear with us. Thanks.

The choose is only setup for 1 choice at a time right now. Support will be In 6.2.2 most likely in a week or two. It will need another JSON key passed to it. multiple: true, which can also accept delimiter: ", ". I’ll be updating the parameters docs on this as well.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.