Problem Dehydrated Multiple Select
I have created a form widget with two
Select
fields:
Here is the corresponding submit
function:
The issue is that the roles
select field retrieves the data correctly, but the teams
select field doesn't work as expected. Has anyone encountered this problem or found a solution?6 Replies
Fairly sure usually relationships are returned empty / bool. try
->getRawState()
for the teams and the roles. But be careful since that's raw
they only suck when I set the select to multiple
Here's my component, I don't understand why without multiple I have the data but with multiple I don't.
Same problem, with ->multiple in select, no data, only if use mutateFormDataBeforeCreate
even using mutateFormDataBeforeCreate, I still have the problem
Solution
the solution is to put in the mount() function "$this->form->fill([]);"