Trying to create an set number of groups nested in a larger group. Want to have the ability to sort the nested groups. This only works when Add More is present. Does anyone know how to make these groups sortable?
Asked
Active
Viewed 109 times
0
-
I suggest posting your code. Did you set `'sortable' => true,`? – git-e-up Jan 04 '18 at 19:14
-
Yes I used `'sortable' => true`, but that only seemed to work when I added `limit = 0` – AmeliaK Jan 04 '18 at 21:11
-
`public function builder() { return new \Fieldmanager_Group( [ 'name' => 'builder', 'children' => [ 'sortable_area' => new \Fieldmanager_Group( [ 'tabbed' => false, 'label' => 'Sortable Area', 'children' => [ 'part_one_group' => new \Fieldmanager_Group( [ 'label' => 'Part 1 Group', 'sortable' => true, 'children' => [ // ], ] ), ] ),` – AmeliaK Jan 04 '18 at 21:14
-
Haven't used it in a while, but if I recall, I don't think the parents are sortable if the children are too. If you move the `'sortable' => true` before your children array does that mess it up? – git-e-up Jan 04 '18 at 22:42
-
So I want the children of sortable area to be sortable, not the parent. When I move it to the parent only the parent is sortable. – AmeliaK Jan 04 '18 at 22:44
-
Oh okay. Well I just tried putting in a non-zero limit on some old code for a group and it was still sortable. Granted, my code looks way different. Sorry I can't be of more help. – git-e-up Jan 04 '18 at 23:32