This means, that default value will be written into database without signing up in formuar. Activating checkBox means, that user will see check-box fiield, which is activated. Saving value into database is same in both cases…
As I said, set the default values (or, initial values) to the attribute of the model before you render the checkbox list, then you will see the corresponding checkboxes initially checked (or, activated, in your term) in the form.
// check 'an:' and 'bc:' by default
$ZMailAusgangEmpfaenger->id_empfaenger_art = [1, 2];
BTW, could you show us what ‘id_empfaenger_art’ attribute is like? As you see in the example code, ‘id_empfaenger_art’ must hold an array of ids.
As U can see, id_empfaenger_art doesn’t hold an array of ids. It holds an array, whether checkBox has been checked or not checked. In this case, all checkBoxes have been checked. I assume, that’s what U wanted to say with ‘array of ids’, isn’t it?
For me, [size=“2”]‘array of ids’ means array of PrimaryKey…[/size]
[size=“2”]In any case, ur suggestion doesn’t work. I code like this both,in Controller and in formular:[/size]