How to display data in field type with dropdown multi select checkbox? I'm able to get data using API but when I use checkboxField then it only display the blank checkbox without value. In Model,

    if($result){
        if (isset($result-&gt;error)) die($result-&gt;error_message);
        //convert json data to array
        $arr = json_decode($result, true);

        //Get project array from API
        $json = $arr['projects'];

        foreach ($json as $i =&gt; $v){

            return array_merge(parent::defineAttributes(), array(
                'someField'     =&gt; array(AttributeType::String, 'default' =&gt; $v['name']),
            ));
        }


And my template, 

{% import "_includes/forms" as forms %}

{{ forms.checkboxField({
id: id ~ 'someField',
class:'nicetext',
name: name ~ '[someField]',
value: values.someField,
checked: value,
errors: values.getErrors('someField'),
required: false,}) }}


Need some help. TIA!
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