MIGX
MIGX copied to clipboard
@EVAL binding not working after update
@eval binding is not working after update to latest: This is just showing the eval statement in the dropdown select box.
{
"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 ---==||none' . $modx->runSnippet('migxLoopCollection',array('packageName'=>'projects','classname'=>'ProjectStatus','tpl'=>'@CODE:[[+status]]==[[+id]]','outputSeparator'=>'||'));",
"default":"",
"useDefaultIfEmpty":"0",
"pos":3
},
which MODX version? MODX 3 doesn't support @EVAL Binding any more. But there is a @SNIPPET Binding now or @CHUNK Binding should also work. See MODX documentation about Bindings.
modx 3.0.4 and migx 3.0.2 - I did not know about the @EVAL being removed.
Yes, thank you the @snippet is working as advertised:
@SNIPPET migxLoopCollection {
"packageName":"projects",
"classname":"ProjectCategory",
"tpl":"@CODE:[[+category]]==[[+id]]",
"outputSeparator":"||"
}```