Toni
Empty field on condition
I have the following schema:
I want to empty the select box if the toggle button
notify_unlock
is false. As far I tried:
- dehydrateStateUsing
- beforeStateDehydrated
None of them set the value of the Selectbox to null.
Kind regards,
Toni5 replies
ManyToMany Relationship via Select element
Why do I have to set a Select-Element to
->multiple()
in case of belongsToMany?
The use case why I am asking is, that I have a manyToMany relationship between users and institutes.
- In case a user has a system role, no relationship is needed
- In case a user has a monocentric role, the relationship is oneToMany (seen from a institute perspective)
- In case a user has a multicentric role, the relationship turns into manyToMany.
I would like to solve this with a Select-Element and make it multiple or not, depending on the role. But if multiple is false, I got an error message:
If I turn the select element to multiple choice everything works fine, except of monocentric roles (I can attach more than one institute).
What is the reason for this "limitation"?2 replies