You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any particular reason for this? We tried to "fake it" by adding the exists => true to the result of withDefault(). That worked, but causes many other problems, so that is not the way to go :)
However removing these lines from the EntanglesStateWithSingularRelationship concern, actually made it work, without any other errors in the application. Of course this is just our application, so I wonder if this could be removed from the code or not? Or if there is any specific reason that this check is there that I don't see at the moment.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Package
Form builder
Package Version
v3.2.116
How can we help you?
Our use case is that we have relations with default values (using the withDefault() method).
We would like that the forms in Filament renders with the default values filled in (also if the record doesn't even exist).
After investigation we found out at that the following line it is checked if the related record actually exists:
https:/filamentphp/filament/blob/ecbb22b44bcb4c62a85fa88d4aa79be3f66ce0db/packages/forms/src/Components/Concerns/EntanglesStateWithSingularRelationship.php#L224C1-L226C10
Is there any particular reason for this? We tried to "fake it" by adding the exists => true to the result of withDefault(). That worked, but causes many other problems, so that is not the way to go :)
However removing these lines from the EntanglesStateWithSingularRelationship concern, actually made it work, without any other errors in the application. Of course this is just our application, so I wonder if this could be removed from the code or not? Or if there is any specific reason that this check is there that I don't see at the moment.
Beta Was this translation helpful? Give feedback.
All reactions