Selectively saving form builder fields in different DB columns
Hi, I built a large form with many input fields in a livewire component with form builder. Most of the fields will be saved directly to their corresponding DB columns, so just creating a new model with
$this->form->getState()
is fine. However, I want to exclude some of the fields and combine them into a single JSON DB column. Is there any way to exclude fields from the getState()
method and save those manually?3 Replies
Or you override the default save method usind
handleRecordCreation()
https://filamentphp.com/docs/3.x/panels/resources/creating-records#customizing-the-creation-processIf you are using the Panel builder, you could customize the creation process using
handleRecordCreation
as ChesterS mentioned