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:Jump to 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...
5 Replies
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
Something like #codewithdennis-select-tree ?
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
Here is the hierarchical structure which is created using custom form field
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