Modify data before saving on livewire
how can i modify the form data before it is submited using form build with livewire.
2 Replies
You mean on your own component, not in a resource in a panel? In your save method you can do what you want with the data you get from $this->form->getState() before you save it to your model.
If you are working in an admin panel with resource, you can ad a mutateDataBeforeSave() method to the Create/Edit page.
https://filamentphp.com/docs/3.x/panels/resources/editing-records/#customizing-data-before-saving
Oh, okay.
Thanks