alexander-schranz/sulu-form-bundle

Error: Array to string conversion

Closed this issue · 1 comments

If a form contains checkboxes, the form doesn't save any data because the final form data contains arrays. Error message is Array to string conversion

this is not a problem of the form bundle itself you need to convert fix your entity for doctrine to save the array as json when you want it, edit your getter and setter functions. I would recommend it to have a subform for multi checkbox.

If its not multiple you probably did accidently use choice instead of checkbox field type.