Checkbox Problem When Using Editor

Checkbox Problem When Using Editor

th3t1ckth3t1ck Posts: 228Questions: 37Answers: 1

Hi. I am trying to setup a checkbox on an editor 1.6.1 form. I am using the examples here https://editor.datatables.net/reference/field/checkbox as a guide but it appears an array keeps being passed giving me the Array to string error. I get the following error...

<b>Notice</b>:  Array to string conversion in <b>/var/www/cciu_cms/php/Database/Driver/Mysql/Query.php</b> on line <b>92</b><br />
{"data":[{"DT_RowId":"row_201900325",..."case_true":"Array",...

I am trying to pass an object and use a boolean. Here is my field definition...

fields: [ { ...
, {
        type: 'checkbox',
                label: 'True:',
                name: 'cases.case_true',
            options: [
                { label:'yes', value: 1 }
            ],
        seperator: '',
        unselectedValue: 0
            }

This question has an accepted answers - jump to answer

Answers

  • th3t1ckth3t1ck Posts: 228Questions: 37Answers: 1
    edited January 2020

    Actually the example above should have been ...

    , {
            type: 'checkbox',
            label: 'True:',
            name: 'cases.case_true',
                options: { 'yes': 1 },
            seperator: '',
            unselectedValue: 0
                }
    

    but they both give me the same error/result.

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    Answer ✓

    "separator" not "seperator".

  • th3t1ckth3t1ck Posts: 228Questions: 37Answers: 1

    Thanks Tangerine! That was the culprit.

This discussion has been closed.