Choice generated dynamically does not support multiple

Hi @ASpahiu

We’ve shared some code with you, including different conditions. Please check it once—hopefully, it will work. If not, kindly share the page with us, and we’ll take a look and provide guidance.

Update code:

{% choice "multi_choice_field" label="multiple choice" display="checkbox" <!-- Change display to checkbox for multiple options --> choices=[ [ "option-1", "Option 1" ], [ "option-2", "Option 2" ] ] multiple=true %}

If you want to generate options dynamically, you can do so by using HubL loops. Here’s an example of how you can generate choices dynamically:

{% set options = [ { "value": "option-1", "label": "Option 1" }, { "value": "option-2", "label": "Option 2" }, { "value": "option-3", "label": "Option 3" } ] %} {% choice "multi_choice_field" label="multiple choice" display="checkbox" multiple=true choices=options %}

If you prefer to keep the dropdown style but allow multiple selections, you’ll need to manually adjust the HTML using the select tag and enable multiple selections like this:

<select name="multi_choice_field" multiple> {% for option in options %} <option value="{{ option.value }}">{{ option.label }}</option> {% endfor %} </select>

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.
Thanks!