F
Filament2mo ago
raush

Custom Form Field

is it possible to create custom form field with the hierarchical structure of a checkbox in which we can select multiple checkboxes in a filament resource form? I was trying but getting issues with data binding
Solution:
We also have CheckboxList but that’s without hierarchy. Maybe you can look at those examples. You will need an array for the binding...
Jump to solution
5 Replies
slamx_
slamx_2mo ago
Do you have a example? Its possible to create a custom field for checkboxes. You only need to setup the state as Array to store the values
Dennis Koch
Dennis Koch2mo ago
Something like #codewithdennis-select-tree ?
Solution
Dennis Koch
Dennis Koch2mo ago
We also have CheckboxList but that’s without hierarchy. Maybe you can look at those examples. You will need an array for the binding
raush
raush2mo ago
Here is the hierarchical structure which is created using custom form field
No description
raush
raush2mo ago
And in resource form I did HierarchyTree::make('categories') To show this in create form <div x-data="{ state: $wire.$entangle('{{ $getStatePath() }}') }"> <input x-model="state" /> </div> So how can i do an array of binding