how do I give a default value to a field using a closure that has access to the record
I want to have a checkbox that is either checked or unchecked based on some arbitrary code in a closure that gets access to the
$record
. Is this possible? Currently I am getting the error Typed property Filament\Forms\Components\Component::$container must not be accessed before initialization
Solution:Jump to solution
Because this is the form builder, you can use
$form->getModelInstance()
along with the default
method on components3 Replies
i try this to calculate the total but not wokring for me
Solution
Because this is the form builder, you can use
$form->getModelInstance()
along with the default
method on components