i have set up a cmp with help of migxdb (2.9.6-pl in modx 2.5.1-pl). I use custom tables with an aggregate to modResource: my custom class "employees" has a many to many relation to class modResource. Thus, in my Formtabs I have a field with input tv type "listbox-multiple". It fetches the pagetitles of a certain parents' resources. It works well an the relations are saved to my join table. The only
in my listbox-multiple.
I read every documentation/thread available, but can't get the point of what i'm missing. I hope someone could give me a hint. Thanks in advance everybody who gives a look! Here is my code:
{
"formtabs":[
{
"MIGX_id":4,
"caption":"Neuer Ansprechpartner",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":34,
"field":"resources_id",
"caption":"Zuordnung zu Seite",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"listbox-multiple",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"@CHUNK test",
"default":"",
"useDefaultIfEmpty":"0",
"pos":1
},
{
"MIGX_id":6,
"field":"positions_id",
"caption":"Funktion",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"listbox",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"@EVAL return '--- w\u00e4hlen ---==||' . $modx->runSnippet('migxLoopCollection',array('packageName'=>'berlin','classname'=>'Positions','tpl'=>'@CODE:[[+name]]==[[+id]]','outputSeparator'=>'||'));",
"default":"",
"useDefaultIfEmpty":"0",
"pos":2
},
{
"MIGX_id":7,
"field":"name",
"caption":"Name",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":3
}
],
"pos":1
}
],
"contextmenus":"update||remove",
"actionbuttons":"addItem",
"columnbuttons":"update",
"filters":"",
"extended":{
"migx_add":"Neuer Ansprechpartner",
"disable_add_item":"",
"add_items_directly":"",
"formcaption":"",
"update_win_title":"",
"win_id":"employees",
"maxRecords":"",
"addNewItemAt":"bottom",
"multiple_formtabs":"",
"multiple_formtabs_label":"",
"multiple_formtabs_field":"",
"multiple_formtabs_optionstext":"",
"multiple_formtabs_optionsvalue":"",
"actionbuttonsperrow":4,
"winbuttonslist":"",
"extrahandlers":"",
"filtersperrow":4,
"packageName":"berlin",
"classname":"Employees",
"task":"",
"getlistsort":"",
"getlistsortdir":"",
"sortconfig":"",
"gridpagesize":"",
"use_custom_prefix":"0",
"prefix":"",
"grid":"",
"gridload_mode":2,
"check_resid":1,
"check_resid_TV":"",
"join_alias":"",
"has_jointable":"yes",
"getlistwhere":"",
"joins":[
{
"alias":"Position"
},
{
"alias":"EmployeeResource"
}
],
"hooksnippets":{
"aftersave":"EmployeesResourcesAftersave"
},
"cmpmaincaption":"Ansprechpartner",
"cmptabcaption":"Ansprechpartner",
"cmptabdescription":"Ansprechpartner",
"cmptabcontroller":"",
"winbuttons":"",
"onsubmitsuccess":"",
"submitparams":""
},
"columns":[
{
"MIGX_id":3,
"header":"Id",
"dataIndex":"id",
"width":"",
"sortable":"false",
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
},
{
"MIGX_id":4,
"header":"Funktion",
"dataIndex":"Position_name",
"width":"",
"sortable":"false",
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
},
{
"MIGX_id":2,
"header":"Name",
"dataIndex":"name",
"width":"",
"sortable":"false",
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
}
]
}
Snippet code that populates the listbox-multiple (MIGX-ID 34 in config obove) via @CHUNK test