I managed to replace my text input with a multiple choice and it’s working:
$this->add('down_by', 'choice', [
'choices' => FormHelper::downByChoises(),
'attr' => ['class' => 'select2 pmd-select2 form-control'],
'label' => trans('secdocuments::secdocuments.form.down_by'),
'empty_value' => trans('core::core.empty_select'),
'exapanded' => false,
'multiple' => true
Now I have this issue:
Illuminate \ Database \ QueryException
Array to string conversion (SQL: update
updated_at = 2019-04-30 13:54:50,
down_by = user-2,
notify_by = user-2,
closing_date = 2019-04-25 00:00:00 where
id = 2)
The fields I’m trying to update are: down_by and notify_by .
But it isn’t saving the entire array into the database field. I was expecting that it would work as the database field is a varchar.
Thanks for your help.