Set default checkboxlist value
Can someone give me example how to have a checkboxlist with default value?
i've tried this, but it's not working
8 Replies
->default(2)
, default(key)i got error
syntax error, unexpected token "default", expecting "]"
what if i want to checked more than one value?
You need to pass it as an array
so [2,3,4]
Noting that it will only work as default on new records not editing exisitng.
Sorry for bad answer, I confuse with columns.. π
Please mark as solved if this worked
what if i want to checked some value in edit modal page?
You need to modify the data with mutating it, Filament/Livewire populate the form data on load from the mount function you see, so the form cannot set default values from values that do not exist.
ok thanks for the idea..
i'll try..