fill form with initial data before show form
I need to fill the form with initial data before the form is show.. I don't want to do it on field level .. I want to modify the whole data/state
4 Replies
In which context? Are you in a filament resource or a custom livewire component?
@igorclauss filament resource.. I want to initiate the Builder field with initial data so it will shown when the form is shown
You have access to the state on the createResourcePage, also there are lifecycle hooks. But maybe it is still the best to use defaults on field level. It depends on what you want to achieve
I am using simple resource.
I am doing almost the same in another resource using afterStateUpdate using
$set('builder_field', [])
. because it depends on another field. but this time it doesn't depend on another field so I need to modify it before the form is shown
oh I am using regular resource
but with modal