Disabled Select field inside Repeater item not storing data
I have this Select field insider my Repeater item:
Which I have disabled because it is purely there to store relationship data in a pivot table.
When I disable the Select field, the relationship data is not stored in the pivot tabel, but if I remove
->disabled()
the data is saved as expected.
Is there a way to disable or hide a Select field like this, while still storing the data in the pivot table?8 Replies
try shouldSaveRelationshipsWhenDisabled
same exists for hidden fields
How exactly should this be used?
This doesn't seem to work:
mmh .. but that's the way
GitHub
filament-plugin-panel-permissions/src/Filament/Resources/RoleResour...
Contribute to mvenghaus/filament-plugin-panel-permissions development by creating an account on GitHub.
here i use it
ah
wrong method π
Solution
saveRelationshipsWhenHidden
π
This should be in the documentation right about here somewhere:
https://filamentphp.com/docs/3.x/forms/fields/select#integrating-with-an-eloquent-relationship
Would have saved me 24 hours of tinkering.
Thank you so much!!