How to edit resource properties on simple resource creation?
Hi, I'm trying to mutate the data before resource creation on a simple resource using the documented method but the method is not being called, also the create another button cannot be disabled in simple resource creation model.
3 Replies
Simple respurces work through the Create/EditAction so you need to modify those:
https://filamentphp.com/docs/3.x/actions/prebuilt-actions/create#customizing-data-before-saving
when using simple resource, a ManageXXX is also created, there's a getHeaderActions() function that returns an array of actions, by default a CreateAction is present, you can chain createAnother and mutateFormDataUsing like,
Thanks, got it!