Here are the changes I made to get this to work.
{
"formtabs":[
{
"MIGX_id":39,
"caption":"Project Details",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":152,
"field":"title",
"caption":"Project Title",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"required",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":1
},
{
"MIGX_id":155,
"field":"category",
"caption":"Project Category",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"listbox",
"validation":"required",
"configs":"\n",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"@EVAL return '--- Choose Category ---==||' . $modx->runSnippet('migxLoopCollection',array('packageName'=>'projects','classname'=>'ProjectCategory','tpl'=>'@CODE:[[+category]]==[[+id]]','outputSeparator'=>'||'));",
"default":"",
"useDefaultIfEmpty":"0",
"pos":2
},
{
"MIGX_id":156,
"field":"status",
"caption":"Project Status",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"listbox",
"validation":"required",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"@EVAL return '--- Choose Status ---==||' . $modx->runSnippet('migxLoopCollection',array('packageName'=>'projects','classname'=>'ProjectStatus','tpl'=>'@CODE:[[+status]]==[[+id]]','outputSeparator'=>'||'));",
"default":"",
"useDefaultIfEmpty":"0",
"pos":3
},
{
"MIGX_id":153,
"field":"tenderdate",
"caption":"Tender Date",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"date",
"validation":"required",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":4
},
{
"MIGX_id":157,
"field":"sqfoot",
"caption":"Square Feet",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"required",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":5
},
{
"MIGX_id":154,
"field":"description",
"caption":"Description",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"textarea",
"validation":"required",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":6
},
{
"MIGX_id":159,
"field":"published",
"caption":"Published",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"checkbox",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"yes==1||no==0",
"default":1,
"useDefaultIfEmpty":1,
"pos":7
},
{
"MIGX_id":160,
"field":"featured",
"caption":"Project is featured",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"checkbox",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"yes==1||no==0",
"default":"0",
"useDefaultIfEmpty":"0",
"pos":8
},
{
"MIGX_id":220,
"field":"deleted",
"caption":"Deleted",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"checkbox",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"yes==1||no==0",
"default":"0",
"useDefaultIfEmpty":1,
"pos":9
}
],
"pos":1
},
{
"MIGX_id":40,
"caption":"Project Documents",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":161,
"field":"",
"caption":"Documents",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"migxdb",
"validation":"",
"configs":"Documents",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":[
{
"MIGX_id":1,
"context":"web",
"sourceid":4
},
{
"MIGX_id":2,
"context":"mgr",
"sourceid":4
}
],
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":1
}
],
"pos":2
},
{
"MIGX_id":49,
"caption":"Project Images",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":197,
"field":"",
"caption":"Images",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"migxdb",
"validation":"",
"configs":"Images",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":[
{
"MIGX_id":1,
"context":"mgr",
"sourceid":3
},
{
"MIGX_id":2,
"context":"web",
"sourceid":3
}
],
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":1
}
],
"pos":3
}
],
"contextmenus":"update||duplicate||remove",
"actionbuttons":"addItem||toggletrash",
"columnbuttons":"",
"filters":"",
"extended":{
"migx_add":"Add New Project",
"disable_add_item":"",
"add_items_directly":"",
"formcaption":"",
"update_win_title":"",
"win_id":"proj",
"maxRecords":"",
"addNewItemAt":"bottom",
"media_source_id":"",
"multiple_formtabs":"",
"multiple_formtabs_label":"",
"multiple_formtabs_field":"",
"multiple_formtabs_optionstext":"",
"multiple_formtabs_optionsvalue":"",
"actionbuttonsperrow":4,
"winbuttonslist":"cancel||done",
"extrahandlers":"this.toggleDeleted||this.handleColumnSwitch",
"filtersperrow":4,
"packageName":"projects",
"classname":"Project",
"task":"",
"getlistsort":"",
"getlistsortdir":"",
"sortconfig":"",
"gridpagesize":50,
"use_custom_prefix":"0",
"prefix":"",
"grid":"",
"gridload_mode":2,
"check_resid":"0",
"check_resid_TV":"",
"join_alias":"",
"has_jointable":"no",
"getlistwhere":"",
"joins":[
{
"alias":"ProjectDocument"
},
{
"alias":"ProjectImage"
},
{
"alias":"ProjectCategory"
},
{
"alias":"ProjectStatus"
}
],
"hooksnippets":"",
"cmpmaincaption":"",
"cmptabcaption":"",
"cmptabdescription":"",
"cmptabcontroller":"",
"winbuttons":"",
"onsubmitsuccess":"",
"submitparams":""
},
"columns":[
{
"MIGX_id":2,
"header":"id",
"dataIndex":"id",
"width":25,
"sortable":true,
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
},
{
"MIGX_id":3,
"header":"Project",
"dataIndex":"title",
"width":"",
"sortable":true,
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":"this.textEditor"
},
{
"MIGX_id":6,
"header":"Category",
"dataIndex":"category",
"width":"",
"sortable":true,
"show_in_grid":1,
"customrenderer":"",
"renderer":"this.renderChunk",
"clickaction":"switchOption",
"selectorconfig":"",
"renderchunktpl":"[[!projects? &function=`getListBoxOption` &alias=`ProjectCategory` &object_id=`[[+ProjectCategory_id]]` &return_column=`category`]]",
"renderoptions":"",
"editor":"this.listboxEditor"
},
{
"MIGX_id":7,
"header":"Project Status",
"dataIndex":"status",
"width":"",
"sortable":true,
"show_in_grid":1,
"customrenderer":"",
"renderer":"this.renderChunk",
"clickaction":"switchOption",
"selectorconfig":"",
"renderchunktpl":"[[!projects? &function=`getListBoxOption` &alias=`ProjectStatus` &object_id=`[[+ProjectStatus_id]]` &return_column=`status`]]",
"renderoptions":"",
"editor":"this.listboxEditor"
},
{
"MIGX_id":4,
"header":"Tender Date",
"dataIndex":"tenderdate",
"width":"",
"sortable":true,
"show_in_grid":1,
"customrenderer":"",
"renderer":"this.renderDate",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
},
{
"MIGX_id":8,
"header":"Square Feet",
"dataIndex":"sqfoot",
"width":"",
"sortable":true,
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
},
{
"MIGX_id":11,
"header":"Featured",
"dataIndex":"featured",
"width":50,
"sortable":true,
"show_in_grid":1,
"customrenderer":"",
"renderer":"this.renderSwitchStatusOptions",
"clickaction":"switchOption",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":[
{
"MIGX_id":1,
"name":"published",
"use_as_fallback":1,
"value":1,
"clickaction":"switchOption",
"handler":"",
"image":"assets\/components\/migx\/style\/images\/tick.png"
},
{
"MIGX_id":2,
"name":"published",
"use_as_fallback":"",
"value":1,
"clickaction":"switchOption",
"handler":"",
"image":"assets\/components\/migx\/style\/images\/tick.png"
},
{
"MIGX_id":3,
"name":"unpublished",
"use_as_fallback":"",
"value":"0",
"clickaction":"switchOption",
"handler":"",
"image":"assets\/components\/migx\/style\/images\/cross.png"
}
],
"editor":""
},
{
"MIGX_id":9,
"header":"Deleted",
"dataIndex":"deleted",
"width":50,
"sortable":true,
"show_in_grid":1,
"customrenderer":"",
"renderer":"this.renderSwitchStatusOptions",
"clickaction":"switchOption",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":[
{
"MIGX_id":1,
"name":"published",
"use_as_fallback":1,
"value":1,
"clickaction":"switchOption",
"handler":"",
"image":"assets\/components\/migx\/style\/images\/tick.png"
},
{
"MIGX_id":2,
"name":"published",
"use_as_fallback":"",
"value":1,
"clickaction":"switchOption",
"handler":"",
"image":"assets\/components\/migx\/style\/images\/tick.png"
},
{
"MIGX_id":3,
"name":"unpublished",
"use_as_fallback":"",
"value":"0",
"clickaction":"switchOption",
"handler":"",
"image":"assets\/components\/migx\/style\/images\/cross.png"
}
],
"editor":""
},
{
"MIGX_id":10,
"header":"Published",
"dataIndex":"published",
"width":50,
"sortable":true,
"show_in_grid":1,
"customrenderer":"",
"renderer":"this.renderSwitchStatusOptions",
"clickaction":"switchOption",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":[
{
"MIGX_id":1,
"name":"published",
"use_as_fallback":1,
"value":1,
"clickaction":"switchOption",
"handler":"",
"image":"assets\/components\/migx\/style\/images\/tick.png"
},
{
"MIGX_id":2,
"name":"published",
"use_as_fallback":"",
"value":1,
"clickaction":"switchOption",
"handler":"",
"image":"assets\/components\/migx\/style\/images\/tick.png"
},
{
"MIGX_id":3,
"name":"unpublished",
"use_as_fallback":"",
"value":"0",
"clickaction":"switchOption",
"handler":"",
"image":"assets\/components\/migx\/style\/images\/cross.png"
}
],
"editor":""
}
],
"category":""
}
all my projects snippet does is call the projcects class & pass on some properties: