Relation Manager: How to customize edit action?
Given the following example of a
form
in a relation manager:
How can I hook into the updating process of the edit action of the form? A lot of the docs only mention resource pages and not the relation manager itself.
What I want to achieve:
- Set the pivot model's attribute to ['*']
if the checkbox is selected. I tried it using afterStateUpdated
but that doesn't work.
I think I need to hook into the form's lifecycle but it seems like a Relation Manager does not have anything like https://filamentphp.com/docs/3.x/panels/resources/editing-records#customizing-data-before-saving nor https://filamentphp.com/docs/3.x/panels/resources/editing-records#customizing-the-saving-process. Also this https://filamentphp.com/docs/3.x/actions/prebuilt-actions/edit#customizing-the-saving-process doesn't work, because the EditAction is only indirectly used in the form
method of the Relation Manager?0 Replies