aaantz
November 7, 2019, 5:50pm
1
Hi fellas,
I have a multi formtabs configuration and I would like to show the multiple_formtabs_optionstext in my grid column. I also tried renderChunk without luck.
I am trying to achieve this:
{
"MIGX_id":2,
"header":"Layout",
"dataIndex":"multiple_formtabs_optionstext",
...
1 Like
dimmy
December 23, 2019, 12:31pm
2
I use a small snippet for this:
if (!isset($input)) {
return 'use as output filter on [[+MIGX_formname:migxGetOptionName]]';
};
$migx = $modx->getService('migx', 'Migx', $modx->getOption('migx.core_path', null, $modx->getOption('core_path') . 'components/migx/') . 'model/migx/', $scriptProperties);
$config = $modx->getObject('migxConfig', array('name' => $input, 'deleted' => '0'));
$extended = json_decode($config->extended);
return $extended->multiple_formtabs_optionstext;
And call it in the renderer like this:
[[+MIGX_formname:migxGetOptionName]]
"MIGX_id":3,
"header":"Description",
"dataIndex":"block_info",
"width":150,
"sortable":"false",
"show_in_grid":1,
"customrenderer":"",
"renderer":"this.renderChunk",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"<b> [[+MIGX_formname:migxGetOptionName]]<\/b>",
"renderoptions":"",
"editor":""
}
Make sure that the snippet is NOT static, it some how does not work if its static
1 Like
aaantz
December 25, 2019, 8:16am
3
Thank you very much, that works perfectly!
1 Like
system
Closed
December 27, 2019, 8:30am
4
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.