Hi I have a tv named shopTagsTV and the package shopTags in MigxDB with field resource_id which I need to be filled in automatically basing on the id of the modx resource where I using shopTagsTV.
It will be also great if I will be able to make this field (resource_id) looks like a dropdownlist with names of pagetitles of the catalog resources and values of ids.
{
"id":2,
"name":"shopTags",
"formtabs":[
{
"MIGX_id":2,
"caption":"\u0422\u0435\u0433\u0438",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":15,
"field":"resource_id",
"caption":"resource_id",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"listbox",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"@SELECT pagetitle, id FROM modx_site_content WHERE id=53",
"default":"@SELECT pagetitle, id FROM modx_site_content WHERE id=53",
"useDefaultIfEmpty":"0",
"pos":1
},
{
"MIGX_id":16,
"field":"alias",
"caption":"alias",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":2
},
{
"MIGX_id":17,
"field":"pagetitle",
"caption":"pagetitle",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":3
},
{
"MIGX_id":18,
"field":"introtext",
"caption":"introtext",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"textareamini",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":4
},
{
"MIGX_id":19,
"field":"keywords",
"caption":"keywords",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"richtext",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":5
},
{
"MIGX_id":20,
"field":"content",
"caption":"content",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"richtext",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":6
},
{
"MIGX_id":21,
"field":"tags",
"caption":"tags",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":7
},
{
"MIGX_id":22,
"field":"menuindex",
"caption":"menuindex",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"none",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":8
},
{
"MIGX_id":23,
"field":"hidemenu",
"caption":"hidemenu",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"checkbox",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"yes==1",
"default":"0",
"useDefaultIfEmpty":"0",
"pos":9
},
{
"MIGX_id":24,
"field":"published",
"caption":"published",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"checkbox",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"yes==1",
"default":1,
"useDefaultIfEmpty":"0",
"pos":10
},
{
"MIGX_id":25,
"field":"publishedon",
"caption":"publishedon",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"date",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":11
}
],
"pos":1
}
],
"contextmenus":"update||duplicate||publish||unpublish||recall_remove_delete||remove||edit_migx||duplicate_migx||remove_migx",
"actionbuttons":"addItem||bulk||toggletrash",
"columnbuttons":"",
"filters":[
{
"MIGX_id":2,
"manufacturer":"Asabella",
"articul":22,
"id":223
},
{
"MIGX_id":1,
"name":"search",
"label":"\u041f\u043e\u0438\u0441\u043a",
"emptytext":"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435",
"type":"textbox",
"getlistwhere":{
"pagetitle:LIKE":"%[[+search]]%"
},
"getcomboprocessor":"",
"combotextfield":"",
"comboidfield":"",
"combowhere":"",
"comboclassname":"",
"combopackagename":"",
"combo_use_custom_prefix":"0",
"comboprefix":"",
"combojoins":"",
"comboparent":"",
"default":""
},
{
"MIGX_id":3,
"manufacturer":"Tesco",
"articul":32,
"id":323
}
],
"extended":{
"migx_add":"",
"disable_add_item":"",
"add_items_directly":"",
"formcaption":"",
"update_win_title":"",
"win_id":"",
"maxRecords":"",
"addNewItemAt":"bottom",
"multiple_formtabs":"",
"multiple_formtabs_label":"",
"multiple_formtabs_field":"",
"multiple_formtabs_optionstext":"",
"multiple_formtabs_optionsvalue":"",
"actionbuttonsperrow":4,
"winbuttonslist":"cancel||done",
"extrahandlers":"",
"filtersperrow":3,
"packageName":"shopTags",
"classname":"shopTags",
"task":"",
"getlistsort":"id",
"getlistsortdir":"desc",
"sortconfig":"",
"gridpagesize":"",
"use_custom_prefix":"0",
"prefix":"",
"grid":"",
"gridload_mode":2,
"check_resid":1,
"check_resid_TV":"",
"join_alias":"",
"has_jointable":"yes",
"getlistwhere":"",
"joins":"",
"hooksnippets":"",
"cmpmaincaption":"",
"cmptabcaption":"",
"cmptabdescription":"",
"cmptabcontroller":"",
"winbuttons":"",
"onsubmitsuccess":"",
"submitparams":""
},
"columns":[
{
"MIGX_id":1,
"header":"id \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438",
"dataIndex":"resource_id",
"width":2,
"sortable":1,
"show_in_grid":1,
"customrenderer":"",
"renderer":"this.renderOptionSelector",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
},
{
"MIGX_id":2,
"header":"alias",
"dataIndex":"alias",
"width":50,
"sortable":true,
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":"this.textEditor"
},
{
"MIGX_id":3,
"header":"pagetitle",
"dataIndex":"pagetitle",
"width":50,
"sortable":true,
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
},
{
"MIGX_id":4,
"header":"introtext",
"dataIndex":"introtext",
"width":50,
"sortable":true,
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
},
{
"MIGX_id":5,
"header":"keywords",
"dataIndex":"keywords",
"width":100,
"sortable":"false",
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
},
{
"MIGX_id":6,
"header":"content",
"dataIndex":"content",
"width":100,
"sortable":"false",
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":"this.textEditor"
},
{
"MIGX_id":7,
"header":"tags",
"dataIndex":"tags",
"width":100,
"sortable":true,
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
},
{
"MIGX_id":8,
"header":"hidemenu",
"dataIndex":"hidemenu",
"width":2,
"sortable":true,
"show_in_grid":1,
"customrenderer":"",
"renderer":"this.renderCrossTick",
"clickaction":"switchOption",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
},
{
"MIGX_id":10,
"header":"published",
"dataIndex":"published",
"width":"",
"sortable":"false",
"show_in_grid":1,
"customrenderer":"",
"renderer":"this.renderCrossTick",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
},
{
"MIGX_id":9,
"header":"publishedon",
"dataIndex":"publishedon",
"width":10,
"sortable":"false",
"show_in_grid":1,
"customrenderer":"",
"renderer":"this.renderDate",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
}
],
"createdby":1,
"createdon":"2016-11-26 21:47:28",
"editedby":1,
"editedon":"2016-11-27 14:02:56",
"deleted":0,
"deletedon":"0000-00-00 00:00:00",
"deletedby":0,
"published":1,
"publishedon":"0000-00-00 00:00:00",
"publishedby":0
}