How to display data in field type with dropdown multi select checkbox?
A checkbox field is just a checkbox, usually checkboxes don't have several values beside true/false or checked/unchecked, Are you sure you don't want to use a select or multiselect

{{ forms.selectField({
    label: "Some Label"|t,
    id: id ~ 'someField',
    name: name ~ '[someField]',
    options: options, //&lt;-- array [label =&gt; X, value =&gt; y]
    value: values.someField // &lt;-- not sure what this should be.. usually you want to pass an id
}) }}


However - your PHP actually doesn't make much sense. Not sure what your goal is with that code