#fill form with initial data before show form

7 messages · Page 1 of 1 (latest)

reef harnessBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

raven ibex
#

In which context? Are you in a filament resource or a custom livewire component?

silver relic
#

@raven ibex filament resource.. I want to initiate the Builder field with initial data so it will shown when the form is shown

raven ibex
#

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

silver relic
#

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