Bruno17 / MIGX

MIGX for revo 2.2 and above
83 stars 78 forks source link

@EVAL binding not working after update #419

Open BigBlockStudios opened 8 months ago

BigBlockStudios commented 8 months ago

@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
      },
Bruno17 commented 8 months ago

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.

BigBlockStudios commented 8 months ago

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":"||"

    }```