This is a working configuration now possible with MIGX 2.2.9
This post is an update of that one, where we had the initial chunklist in default-value:
https://forums.modx.com/thread/79757/sortable-editable-list-of-checkboxes#dis-post-439314
The chunk-list goes now to input-option-values as json and is updated with new items, when you add new chunks to the category.
you can add additional fields with default values to the catched fields.
here is my Test-Configuration
created some chunks in category with id 11 with some text and an additional placeholder to demonstrate how you can add addional custom-infos to each item
migx - TV
name: chunklist
configurations: chunklist
input option values
@EVAL $modx->runSnippet('migxLoopCollection',array('classname'=>'modChunk','where'=>'{"category":"11"}','addfields'=>'selected:0,editablefields:selected','selectfields'=>'id,name','toJsonPlaceholder'=>'json')); return $modx->getPlaceholder('json');
migx - Configuration
name: chunklist
import/export - json:
{"formtabs":"[{\"MIGX_id\":\"1\",\"caption\":\"chunktest\",\"fields\":\"[{\\\"MIGX_id\\\":\\\"1\\\",\\\"field\\\":\\\"name\\\",\\\"caption\\\":\\\"Chunkname\\\",\\\"inputTV\\\":\\\"\\\",\\\"inputTVtype\\\":\\\"\\\",\\\"configs\\\":\\\"\\\",\\\"sourceFrom\\\":\\\"config\\\",\\\"sources\\\":\\\"\\\",\\\"inputOptionValues\\\":\\\"\\\",\\\"default\\\":\\\"\\\"},{\\\"MIGX_id\\\":\\\"2\\\",\\\"field\\\":\\\"extra\\\",\\\"caption\\\":\\\"Extra\\\",\\\"inputTV\\\":\\\"\\\",\\\"inputTVtype\\\":\\\"\\\",\\\"configs\\\":\\\"\\\",\\\"sourceFrom\\\":\\\"config\\\",\\\"sources\\\":\\\"\\\",\\\"inputOptionValues\\\":\\\"\\\",\\\"default\\\":\\\"\\\"},{\\\"MIGX_id\\\":\\\"3\\\",\\\"field\\\":\\\"selected\\\",\\\"caption\\\":\\\"\\\",\\\"inputTV\\\":\\\"\\\",\\\"inputTVtype\\\":\\\"hidden\\\",\\\"configs\\\":\\\"\\\",\\\"sourceFrom\\\":\\\"config\\\",\\\"sources\\\":\\\"\\\",\\\"inputOptionValues\\\":\\\"yes==1||no==0\\\",\\\"default\\\":\\\"\\\"},{\\\"MIGX_id\\\":\\\"4\\\",\\\"field\\\":\\\"selected_ro\\\",\\\"caption\\\":\\\"\\\",\\\"inputTV\\\":\\\"\\\",\\\"inputTVtype\\\":\\\"hidden\\\",\\\"configs\\\":\\\"\\\",\\\"sourceFrom\\\":\\\"config\\\",\\\"sources\\\":\\\"\\\",\\\"inputOptionValues\\\":\\\"\\\",\\\"default\\\":\\\"\\\"}]\"}]","contextmenus":"","actionbuttons":"","columnbuttons":"","filters":"","extended":{"migx_add":"","formcaption":"","win_id":"chunklist","multiple_formtabs":"","extrahandlers":"this.handleColumnSwitch","packageName":"","classname":"","task":"","getlistsort":"","getlistsortdir":"","use_custom_prefix":"0","prefix":"","grid":"","gridload_mode":"1","check_resid":"1","check_resid_TV":"","join_alias":"","getlistwhere":"","joins":"","cmpmaincaption":"","cmptabcaption":"","cmptabdescription":"","cmptabcontroller":""},"columns":"[{\"MIGX_id\":\"1\",\"header\":\"Chunk\",\"dataIndex\":\"name\",\"width\":\"10\",\"sortable\":\"false\",\"show_in_grid\":\"1\",\"renderer\":\"\"},{\"MIGX_id\":\"2\",\"header\":\"Selected\",\"dataIndex\":\"selected\",\"width\":\"10\",\"sortable\":\"true\",\"show_in_grid\":\"1\",\"renderer\":\"this.renderSwitchStatusOptions\",\"renderoptions\":\"[{\\\"MIGX_id\\\":\\\"1\\\",\\\"name\\\":\\\"selected\\\",\\\"value\\\":\\\"1\\\",\\\"clickaction\\\":\\\"switchOption\\\",\\\"handler\\\":\\\"\\\",\\\"image\\\":\\\"assets\\\\\\\/components\\\\\\\/migx\\\\\\\/style\\\\\\\/images\\\\\\\/tick.png\\\"},{\\\"MIGX_id\\\":\\\"2\\\",\\\"name\\\":\\\"unselected\\\",\\\"value\\\":\\\"0\\\",\\\"clickaction\\\":\\\"switchOption\\\",\\\"handler\\\":\\\"\\\",\\\"image\\\":\\\"assets\\\\\\\/components\\\\\\\/migx\\\\\\\/style\\\\\\\/images\\\\\\\/cross.png\\\"}]\"}]"}
frontend
[[!getImageList? &tvname=`chunklist` &tpl=`@FIELD:name` &where=`{"selected":"1"}`]]
[ed. note: Bruno17 last edited this post 12 years, 10 months ago.]